Merge pull request #2368 from nyanmisaka/master

Fix framerate info not showing when mediasource is in H264 format.
This commit is contained in:
dkanada 2020-02-03 15:58:26 +09:00 committed by GitHub
commit c1ecd886d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -90,6 +90,15 @@ namespace MediaBrowser.Controller.MediaEncoding
framerate = val;
}
}
else if (part.StartsWith("fps=", StringComparison.OrdinalIgnoreCase))
{
var rate = part.Split(new[] { '=' }, 2)[^1];
if (float.TryParse(rate, NumberStyles.Any, _usCulture, out var val))
{
framerate = val;
}
}
else if (state.RunTimeTicks.HasValue &&
part.StartsWith("time=", StringComparison.OrdinalIgnoreCase))
{