aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-10-14 03:02:33 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-10-14 03:26:31 +0200
commitd3d715ff134555570d7e2c2aa15aad50f6c6fdbd (patch)
treef8b91bf6546e0d8bd0378f9cee786ba8f4534bee /libavcodec
parent096d96ffda8f4531795abc367d1974289a44fec8 (diff)
downloadffmpeg-d3d715ff134555570d7e2c2aa15aad50f6c6fdbd.tar.gz
mpeg4videodec: Recalculate timebase in case of guessing time increment bits
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/mpeg4videodec.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c
index 122f5f5c0f..a60d03dcae 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