diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-04-28 18:28:41 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-04-28 18:30:50 +0400 |
commit | 34e7d3c3681abce074203402510a31fb9069bcf3 (patch) | |
tree | ddf701effd9d22e23bb7e3d3015e77e8d13345a2 /libavformat/utils.c | |
parent | 502a8f56b9f76e200ec363be7a891f57443bea73 (diff) |
avformat/utils: Ensure that average fps is probed if requested by the user even if tb_unreliable() is 0
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r-- | libavformat/utils.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index 09c85a2e5f..f91c4fcd08 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -3127,13 +3127,14 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options) * the correct fps. */ if (av_q2d(st->time_base) > 0.0005) fps_analyze_framecount *= 2; + if (!tb_unreliable(st->codec)) + fps_analyze_framecount = 0; if (ic->fps_probe_size >= 0) fps_analyze_framecount = ic->fps_probe_size; if (st->disposition & AV_DISPOSITION_ATTACHED_PIC) fps_analyze_framecount = 0; /* variable fps and no guess at the real fps */ - if (tb_unreliable(st->codec) && - !(st->r_frame_rate.num && st->avg_frame_rate.num) && + if (!(st->r_frame_rate.num && st->avg_frame_rate.num) && st->info->duration_count < fps_analyze_framecount && st->codec->codec_type == AVMEDIA_TYPE_VIDEO) break; |