summaryrefslogtreecommitdiff
path: root/libavformat/utils.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2006-12-29 21:16:21 +0000
committerMichael Niedermayer <michaelni@gmx.at>2006-12-29 21:16:21 +0000
commit6268538afa94eeceb61928807d1af11d4d257789 (patch)
tree1f2df33ebb2a3357772d920a1b9d24add8c092f8 /libavformat/utils.c
parent148c9bdbb8042c66d0ea0b6170be568000d2bf1e (diff)
do not base frame rate guess on just one duration
Originally committed as revision 7383 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r--libavformat/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index c5bca5c6d5..118a78f8c6 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -1959,7 +1959,7 @@ int av_find_stream_info(AVFormatContext *ic)
if(st->codec->codec_id == CODEC_ID_RAWVIDEO && !st->codec->codec_tag && !st->codec->bits_per_sample)
st->codec->codec_tag= avcodec_pix_fmt_to_codec_tag(st->codec->pix_fmt);
- if(duration_count[i]
+ if(duration_count[i]>1
&& (st->codec->time_base.num*101LL <= st->codec->time_base.den || st->codec->codec_id == CODEC_ID_MPEG2VIDEO) /*&&
//FIXME we should not special case mpeg2, but this needs testing with non mpeg2 ...
st->time_base.num*duration_sum[i]/duration_count[i]*101LL > st->time_base.den*/){