summaryrefslogtreecommitdiff
path: root/libavcodec/h264_slice.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2014-04-04 12:47:44 +0200
committerAnton Khirnov <anton@khirnov.net>2014-10-15 06:37:43 +0000
commit7ea1b3472a61de4aa4d41b571e99418e4997ad41 (patch)
treefcf38bb7d5d1f770f1e4b8fea256fa6c45313add /libavcodec/h264_slice.c
parentd565fef1b83b6c5f8afb32229260b79f67c68109 (diff)
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.
Diffstat (limited to 'libavcodec/h264_slice.c')
-rw-r--r--libavcodec/h264_slice.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
index 68ae42ef23..42d0c95c70 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@ -1090,7 +1090,7 @@ static int h264_slice_header_init(H264Context *h, int reinit)
int64_t den = h->sps.time_scale;
if (h->x264_build < 44U)
den *= 2;
- av_reduce(&h->avctx->time_base.num, &h->avctx->time_base.den,
+ av_reduce(&h->avctx->framerate.den, &h->avctx->framerate.num,
h->sps.num_units_in_tick, den, 1 << 30);
}