Merge pull request #4548 from orryverducci/mkv-interlaced-fix

Revert "Fix frame rate probing for interlaced MKV files"
This commit is contained in:
Joshua M. Boniface 2020-11-22 13:06:10 -05:00 committed by GitHub
commit f39e55e2e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -694,16 +694,6 @@ namespace MediaBrowser.MediaEncoding.Probing
stream.AverageFrameRate = GetFrameRate(streamInfo.AverageFrameRate); stream.AverageFrameRate = GetFrameRate(streamInfo.AverageFrameRate);
stream.RealFrameRate = GetFrameRate(streamInfo.RFrameRate); stream.RealFrameRate = GetFrameRate(streamInfo.RFrameRate);
// Interlaced video streams in Matroska containers return the field rate instead of the frame rate
// as both the average and real frame rate, so we half the returned frame rates to get the correct values
//
// https://gitlab.com/mbunkus/mkvtoolnix/-/wikis/Wrong-frame-rate-displayed
if (stream.IsInterlaced && formatInfo.FormatName.Contains("matroska", StringComparison.OrdinalIgnoreCase))
{
stream.AverageFrameRate /= 2;
stream.RealFrameRate /= 2;
}
if (isAudio || string.Equals(stream.Codec, "gif", StringComparison.OrdinalIgnoreCase) || if (isAudio || string.Equals(stream.Codec, "gif", StringComparison.OrdinalIgnoreCase) ||
string.Equals(stream.Codec, "png", StringComparison.OrdinalIgnoreCase)) string.Equals(stream.Codec, "png", StringComparison.OrdinalIgnoreCase))
{ {