mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-25 00:33:26 +00:00
avformat/matroskadec: do not trust the default duration to be the real 1/timebase if its less than 5fps
Fixes Ticket3980
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit be695ee389
)
This commit is contained in:
parent
39518589e7
commit
a8a6cdfcd7
@ -1920,7 +1920,8 @@ static int matroska_parse_tracks(AVFormatContext *s)
|
||||
av_reduce(&st->avg_frame_rate.num, &st->avg_frame_rate.den,
|
||||
1000000000, track->default_duration, 30000);
|
||||
#if FF_API_R_FRAME_RATE
|
||||
if (st->avg_frame_rate.num < st->avg_frame_rate.den * 1000L)
|
||||
if ( st->avg_frame_rate.num < st->avg_frame_rate.den * 1000L
|
||||
&& st->avg_frame_rate.num > st->avg_frame_rate.den * 5L)
|
||||
st->r_frame_rate = st->avg_frame_rate;
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user