diff options
author | James Almer <jamrial@gmail.com> | 2023-01-04 13:13:19 -0300 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2023-02-09 15:35:08 +0100 |
commit | 5f9e848e686a3c0795939809712b260af5c1adb8 (patch) | |
tree | c8fd93e026f80dbba898f9d7ac5b84d505c564b6 /libavcodec/h264_parser.c | |
parent | 10c9a0874cb361336237557391d306d26d43f137 (diff) | |
download | ffmpeg-5f9e848e686a3c0795939809712b260af5c1adb8.tar.gz |
avcodec: remove FF_API_AVCTX_TIMEBASE
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/h264_parser.c')
-rw-r--r-- | libavcodec/h264_parser.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c index 3ed23fb9ca..46134a1c48 100644 --- a/libavcodec/h264_parser.c +++ b/libavcodec/h264_parser.c @@ -593,6 +593,7 @@ static int h264_parse(AVCodecParserContext *s, { H264ParseContext *p = s->priv_data; ParseContext *pc = &p->pc; + AVRational time_base = { 0, 1 }; int next; if (!p->got_first) { @@ -624,7 +625,7 @@ static int h264_parse(AVCodecParserContext *s, parse_nal_units(s, avctx, buf, buf_size); if (avctx->framerate.num) - avctx->time_base = av_inv_q(av_mul_q(avctx->framerate, (AVRational){avctx->ticks_per_frame, 1})); + time_base = av_inv_q(av_mul_q(avctx->framerate, (AVRational){avctx->ticks_per_frame, 1})); if (p->sei.picture_timing.cpb_removal_delay >= 0) { s->dts_sync_point = p->sei.buffering_period.present; s->dts_ref_dts_delta = p->sei.picture_timing.cpb_removal_delay; @@ -640,9 +641,9 @@ static int h264_parse(AVCodecParserContext *s, } if (s->dts_sync_point >= 0) { - int64_t den = avctx->time_base.den * (int64_t)avctx->pkt_timebase.num; + int64_t den = time_base.den * (int64_t)avctx->pkt_timebase.num; if (den > 0) { - int64_t num = avctx->time_base.num * (int64_t)avctx->pkt_timebase.den; + int64_t num = time_base.num * (int64_t)avctx->pkt_timebase.den; if (s->dts != AV_NOPTS_VALUE) { // got DTS from the stream, update reference timestamp p->reference_dts = s->dts - av_rescale(s->dts_ref_dts_delta, num, den); |