diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2010-02-04 15:30:37 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2010-02-04 15:30:37 +0000 |
commit | 3102d180bbcba2c960ed1cfd5c6a1954679c0280 (patch) | |
tree | 33138926e542abf8d6fc553654ecc225c6084829 /libavcodec/h264.c | |
parent | ed3e91489bc38b8ec15908c6d11eabd032bcbcbc (diff) | |
download | ffmpeg-3102d180bbcba2c960ed1cfd5c6a1954679c0280.tar.gz |
Fix large timebases.
Fixed issue1633
Originally committed as revision 21636 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r-- | libavcodec/h264.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index d9b1d5fbcd..3a1138e128 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -1781,11 +1781,11 @@ static int decode_slice_header(H264Context *h, H264Context *h0){ } if(h->sps.timing_info_present_flag){ - s->avctx->time_base= (AVRational){h->sps.num_units_in_tick, h->sps.time_scale}; + int64_t den= h->sps.time_scale; if(h->x264_build > 0 && h->x264_build < 44) - s->avctx->time_base.den *= 2; + 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); + h->sps.num_units_in_tick, den, 1<<30); } s->avctx->pix_fmt = s->avctx->get_format(s->avctx, s->avctx->codec->pix_fmts); s->avctx->hwaccel = ff_find_hwaccel(s->avctx->codec->id, s->avctx->pix_fmt); |