summaryrefslogtreecommitdiff
path: root/libavcodec/mpeg12dec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-10-15 13:38:10 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-10-15 15:49:31 +0200
commit17085a0251a1493f6447aa3d2ee06fda2c9402f0 (patch)
treed627e3d5bdcf01ed711249c30247c74dd7087367 /libavcodec/mpeg12dec.c
parent51c810e62b63a1451b337b1cba0141b386066668 (diff)
parent7ea1b3472a61de4aa4d41b571e99418e4997ad41 (diff)
Merge commit '7ea1b3472a61de4aa4d41b571e99418e4997ad41'
* commit '7ea1b3472a61de4aa4d41b571e99418e4997ad41': lavc: deprecate the use of AVCodecContext.time_base for decoding Conflicts: libavcodec/avcodec.h libavcodec/h264.c libavcodec/mpegvideo_parser.c libavcodec/utils.c libavcodec/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mpeg12dec.c')
-rw-r--r--libavcodec/mpeg12dec.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
index 0add65dff7..1f7fca59e5 100644
--- a/libavcodec/mpeg12dec.c
+++ b/libavcodec/mpeg12dec.c
@@ -1308,15 +1308,14 @@ static int mpeg_decode_postinit(AVCodecContext *avctx)
if (avctx->codec_id == AV_CODEC_ID_MPEG1VIDEO) {
// MPEG-1 fps
- avctx->time_base.den = ff_mpeg12_frame_rate_tab[s->frame_rate_index].num;
- avctx->time_base.num = ff_mpeg12_frame_rate_tab[s->frame_rate_index].den;
+ avctx->framerate = ff_mpeg12_frame_rate_tab[s->frame_rate_index];
// MPEG-1 aspect
avctx->sample_aspect_ratio = av_d2q(1.0 / ff_mpeg1_aspect[s->aspect_ratio_info], 255);
avctx->ticks_per_frame = 1;
} else { // MPEG-2
// MPEG-2 fps
- av_reduce(&s->avctx->time_base.den,
- &s->avctx->time_base.num,
+ av_reduce(&s->avctx->framerate.num,
+ &s->avctx->framerate.den,
ff_mpeg12_frame_rate_tab[s->frame_rate_index].num * s1->frame_rate_ext.num * 2,
ff_mpeg12_frame_rate_tab[s->frame_rate_index].den * s1->frame_rate_ext.den,
1 << 30);