aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2006-01-19 00:19:15 +0000
committerMåns Rullgård <mans@mansr.com>2006-01-19 00:19:15 +0000
commit950c2790a2e1826ab08ac6369e21458252b2cead (patch)
treeee18c1c1f65d92fcbf01938875b0486adab0edbe /libavcodec
parente516dbe7c2e28c1f06c721f05ef3251829305af2 (diff)
downloadffmpeg-950c2790a2e1826ab08ac6369e21458252b2cead.tar.gz
interpret H264 VUI timing info correctly
work around bug in x264 build < 44 Originally committed as revision 4866 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/h264.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index be4fff1929..11a4ce792a 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -4309,7 +4309,11 @@ static int decode_slice_header(H264Context *h){
s->avctx->sample_aspect_ratio.den = 1;
if(h->sps.timing_info_present_flag){
- s->avctx->time_base= (AVRational){h->sps.num_units_in_tick, h->sps.time_scale};
+ s->avctx->time_base= (AVRational){h->sps.num_units_in_tick * 2, h->sps.time_scale};
+ if(h->x264_build > 0 && h->x264_build < 44)
+ s->avctx->time_base.den *= 2;
+ av_reduce(&s->avctx->time_base.num, &s->avctx->time_base.den,
+ s->avctx->time_base.num, s->avctx->time_base.den, 1<<30);
}
}