Fix NullRefException in ParseFormat

Former-commit-id: f3c99dffb6
This commit is contained in:
Malte Rosenbjerg 2020-06-21 21:23:16 +02:00
parent 8f832b929c
commit ec53c2ddc0

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,