From f3c99dffb69f7a95f8d247ccba2fbfde39c9475b Mon Sep 17 00:00:00 2001 From: Malte Rosenbjerg Date: Sun, 21 Jun 2020 21:23:16 +0200 Subject: [PATCH] Fix NullRefException in ParseFormat --- FFMpegCore/FFProbe/MediaAnalysis.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FFMpegCore/FFProbe/MediaAnalysis.cs b/FFMpegCore/FFProbe/MediaAnalysis.cs index 4345016..8f02a4f 100644 --- a/FFMpegCore/FFProbe/MediaAnalysis.cs +++ b/FFMpegCore/FFProbe/MediaAnalysis.cs @@ -22,7 +22,7 @@ private MediaFormat ParseFormat(Format analysisFormat) { return new MediaFormat { - Duration = TimeSpan.Parse(analysisFormat.Duration), + Duration = TimeSpan.Parse(analysisFormat.Duration ?? "0"), FormatName = analysisFormat.FormatName, FormatLongName = analysisFormat.FormatLongName, StreamCount = analysisFormat.NbStreams,