Fix NullRefException in ParseFormat

This commit is contained in:
Malte Rosenbjerg 2020-06-21 21:23:16 +02:00
parent b7b15079eb
commit f3c99dffb6

View file

@ -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,