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/cavsdec.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'libavcodec/cavsdec.c') diff --git a/libavcodec/cavsdec.c b/libavcodec/cavsdec.c index fbbd04803a..d0c72a74a0 100644 --- a/libavcodec/cavsdec.c +++ b/libavcodec/cavsdec.c @@ -1106,8 +1106,7 @@ static int decode_seq_header(AVSContext *h) h->low_delay = get_bits1(&h->gb); h->mb_width = (h->width + 15) >> 4; h->mb_height = (h->height + 15) >> 4; - h->avctx->time_base.den = ff_mpeg12_frame_rate_tab[frame_rate_code].num; - h->avctx->time_base.num = ff_mpeg12_frame_rate_tab[frame_rate_code].den; + h->avctx->framerate = ff_mpeg12_frame_rate_tab[frame_rate_code]; h->avctx->width = h->width; h->avctx->height = h->height; if (!h->top_qp) -- cgit v1.2.3