# HG changeset patch # User michael # Date 1167426981 0 # Node ID edb923014029652b6fe35a71577d8102ab292352 # Parent 8813741f7196a9a7d3a28f6e1fb1a6fdf164fa2e do not base frame rate guess on just one duration diff -r 8813741f7196 -r edb923014029 utils.c --- a/utils.c Thu Dec 28 12:35:22 2006 +0000 +++ b/utils.c Fri Dec 29 21:16:21 2006 +0000 @@ -1959,7 +1959,7 @@ 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*/){