[FFmpeg-cvslog] mpeg4videodec: Recalculate timebase in case of guessing time increment bits

Michael Niedermayer git at videolan.org
Sun Oct 14 03:30:51 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Oct 14 03:02:33 2012 +0200| [d3d715ff134555570d7e2c2aa15aad50f6c6fdbd] | committer: Michael Niedermayer

mpeg4videodec: Recalculate timebase in case of guessing time increment bits

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d3d715ff134555570d7e2c2aa15aad50f6c6fdbd
---

 libavcodec/mpeg4videodec.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c
index 122f5f5..a60d03d 100644
--- a/libavcodec/mpeg4videodec.c
+++ b/libavcodec/mpeg4videodec.c
@@ -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



More information about the ffmpeg-cvslog mailing list