Mercurial > libavcodec.hg
comparison h264.c @ 3052:6c3f87300378 libavcodec
interpret H264 VUI timing info correctly
work around bug in x264 build < 44
author | mru |
---|---|
date | Thu, 19 Jan 2006 00:19:15 +0000 |
parents | 0b546eab515d |
children | f02d0b59279c |
comparison
equal
deleted
inserted
replaced
3051:c0fde3eb7784 | 3052:6c3f87300378 |
---|---|
4307 s->avctx->sample_aspect_ratio= h->sps.sar; | 4307 s->avctx->sample_aspect_ratio= h->sps.sar; |
4308 if(!s->avctx->sample_aspect_ratio.den) | 4308 if(!s->avctx->sample_aspect_ratio.den) |
4309 s->avctx->sample_aspect_ratio.den = 1; | 4309 s->avctx->sample_aspect_ratio.den = 1; |
4310 | 4310 |
4311 if(h->sps.timing_info_present_flag){ | 4311 if(h->sps.timing_info_present_flag){ |
4312 s->avctx->time_base= (AVRational){h->sps.num_units_in_tick, h->sps.time_scale}; | 4312 s->avctx->time_base= (AVRational){h->sps.num_units_in_tick * 2, h->sps.time_scale}; |
4313 if(h->x264_build > 0 && h->x264_build < 44) | |
4314 s->avctx->time_base.den *= 2; | |
4315 av_reduce(&s->avctx->time_base.num, &s->avctx->time_base.den, | |
4316 s->avctx->time_base.num, s->avctx->time_base.den, 1<<30); | |
4313 } | 4317 } |
4314 } | 4318 } |
4315 | 4319 |
4316 if(h->slice_num == 0){ | 4320 if(h->slice_num == 0){ |
4317 if(frame_start(h) < 0) | 4321 if(frame_start(h) < 0) |