From 38e3baf7b722380c92700b5712d70b1228364584 Mon Sep 17 00:00:00 2001 From: Hmarik Date: Wed, 3 Jun 2020 20:06:51 +0300 Subject: [PATCH] Fix null reference exception in ParseAudioStream Former-commit-id: 6b294ff5104287eba4a2cf9cb73cd85a1fa19812 --- 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 68f175b..f314c26 100644 --- a/FFMpegCore/FFProbe/MediaAnalysis.cs +++ b/FFMpegCore/FFProbe/MediaAnalysis.cs @@ -67,7 +67,7 @@ private AudioStream ParseAudioStream(FFProbeStream stream) CodecLongName = stream.CodecLongName, Channels = stream.Channels ?? default, ChannelLayout = stream.ChannelLayout, - Duration = TimeSpan.FromSeconds(ParseDoubleInvariant(stream.Duration ?? stream.Tags.Duration ?? "0")), + Duration = TimeSpan.FromSeconds(ParseDoubleInvariant(stream.Duration ?? stream.Tags?.Duration ?? "0")), SampleRateHz = !string.IsNullOrEmpty(stream.SampleRate) ? ParseIntInvariant(stream.SampleRate) : default, Language = stream.Tags?.Language };