aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/libvpxenc.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2023-05-04 11:50:48 +0200
committerAnton Khirnov <anton@khirnov.net>2023-05-15 10:56:18 +0200
commit7d1d61cc5f57708434ba720b03234b3dd93a4d1e (patch)
tree06bb3e329dcb5d9e1ce9083e6e82ed48f70d1135 /libavcodec/libvpxenc.c
parent2953ebe7b6925b045e5652420cf07146fbbb17ab (diff)
downloadffmpeg-7d1d61cc5f57708434ba720b03234b3dd93a4d1e.tar.gz
lavc: deprecate AVCodecContext.ticks_per_frame
For encoding, this field is entirely redundant with AVCodecContext.framerate. For decoding, this field is entirely redundant with AV_CODEC_PROP_FIELDS.
Diffstat (limited to 'libavcodec/libvpxenc.c')
-rw-r--r--libavcodec/libvpxenc.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c
index f70cc87c41..8833df2d68 100644
--- a/libavcodec/libvpxenc.c
+++ b/libavcodec/libvpxenc.c
@@ -1829,7 +1829,13 @@ static int vpx_encode(AVCodecContext *avctx, AVPacket *pkt,
else if (avctx->framerate.num > 0 && avctx->framerate.den > 0)
duration = av_rescale_q(1, av_inv_q(avctx->framerate), avctx->time_base);
else
- duration = avctx->ticks_per_frame ? avctx->ticks_per_frame : 1;
+FF_DISABLE_DEPRECATION_WARNINGS
+ duration =
+#if FF_API_TICKS_PER_FRAME
+ avctx->ticks_per_frame ? avctx->ticks_per_frame :
+#endif
+ 1;
+FF_ENABLE_DEPRECATION_WARNINGS
res = vpx_codec_encode(&ctx->encoder, rawimg, timestamp,
duration, flags, ctx->deadline);