diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-12-15 21:26:50 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-01-03 18:25:38 +0100 |
commit | 0177ac9637b3fb9599f0afd15f765743b6f1900c (patch) | |
tree | 0ea7e79d7d1dcdff4a9279ded9ad01ca346568a9 | |
parent | 17044e1a2bb1926a4937974b58e25061f03739a0 (diff) | |
download | ffmpeg-0177ac9637b3fb9599f0afd15f765743b6f1900c.tar.gz |
lavf: Fix fps misdetection when codec_info_duration is 0 and only a few frames are used to estimate fps.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit d19ca77f42080e7b9a360aee65218724c52e08ae)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/utils.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index eddca1c78e..201a7c6bf8 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -2575,6 +2575,8 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options) if(st->info->codec_info_duration && st->info->codec_info_duration*av_q2d(st->time_base) < (1001*12.0)/get_std_framerate(j)) continue; + if(!st->info->codec_info_duration && 1.0 < (1001*12.0)/get_std_framerate(j)) + continue; for(k=0; k<2; k++){ int n= st->info->duration_count; double a= st->info->duration_error[k][0][j] / n; |