diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-10-15 15:54:02 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-10-15 16:08:36 +0200 |
commit | 09450c55092523d073f7ec415f863531838ca908 (patch) | |
tree | 68ae6a041c8bdb68ad5942b3b5f7f0e6bde23d0c /libavcodec/h264.c | |
parent | 620e7f0f3b3dff85d9c49a5c4b8a5df7143af7fe (diff) | |
download | ffmpeg-09450c55092523d073f7ec415f863531838ca908.tar.gz |
avcodec/h264: fix time_base and framerate
They are not just inverses of each other.
This should restore behavior to before the introduction of framerate
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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 6aa174daf1..0405779284 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -688,10 +688,10 @@ av_cold int ff_h264_decode_init(AVCodecContext *avctx) ff_h264_reset_sei(h); if (avctx->codec_id == AV_CODEC_ID_H264) { if (avctx->ticks_per_frame == 1) { - if(h->avctx->framerate.num < INT_MAX/2) { - h->avctx->framerate.num *= 2; + if(h->avctx->time_base.den < INT_MAX/2) { + h->avctx->time_base.den *= 2; } else - h->avctx->framerate.den /= 2; + h->avctx->time_base.num /= 2; } avctx->ticks_per_frame = 2; } |