From 7ea1b3472a61de4aa4d41b571e99418e4997ad41 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Fri, 4 Apr 2014 12:47:44 +0200 Subject: lavc: deprecate the use of AVCodecContext.time_base for decoding When decoding, this field holds the inverse of the framerate that can be written in the headers for some codecs. Using a field called 'time_base' for this is very misleading, as there are no timestamps associated with it. Furthermore, this field is used for a very different purpose during encoding. Add a new field, called 'framerate', to replace the use of time_base for decoding. --- libavcodec/h264.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavcodec/h264.c') diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 562b1023e3..5127f91df2 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -656,7 +656,7 @@ av_cold int ff_h264_decode_init(AVCodecContext *avctx) h->frame_recovered = 0; if (avctx->codec_id == AV_CODEC_ID_H264) { if (avctx->ticks_per_frame == 1) - h->avctx->time_base.den *= 2; + h->avctx->framerate.num *= 2; avctx->ticks_per_frame = 2; } -- cgit v1.2.1