mpeg4videodec: Recalculate timebase in case of guessing time increment bits
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 14 Oct 2012 01:02:33 +0000 (03:02 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 14 Oct 2012 01:26:31 +0000 (03:26 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/mpeg4videodec.c

index 122f5f5..a60d03d 100644 (file)
@@ -1963,6 +1963,9 @@ static int decode_vop_header(MpegEncContext *s, GetBitContext *gb){
         }
 
         av_log(s->avctx, AV_LOG_ERROR, "my guess is %d bits ;)\n",s->time_increment_bits);
+        if (s->avctx->time_base.den && 4*s->avctx->time_base.den < 1<<s->time_increment_bits) {
+            s->avctx->time_base.den = 1<<s->time_increment_bits;
+        }
     }
 
     if(IS_3IV1) time_increment= get_bits1(gb); //FIXME investigate further