diff options
author | Anton Khirnov <anton@khirnov.net> | 2023-05-04 11:50:48 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2023-05-15 10:56:18 +0200 |
commit | 7d1d61cc5f57708434ba720b03234b3dd93a4d1e (patch) | |
tree | 06bb3e329dcb5d9e1ce9083e6e82ed48f70d1135 /libavcodec/ratecontrol.c | |
parent | 2953ebe7b6925b045e5652420cf07146fbbb17ab (diff) |
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/ratecontrol.c')
-rw-r--r-- | libavcodec/ratecontrol.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libavcodec/ratecontrol.c b/libavcodec/ratecontrol.c index 890ae33cb3..649f570c9d 100644 --- a/libavcodec/ratecontrol.c +++ b/libavcodec/ratecontrol.c @@ -60,7 +60,13 @@ static double get_fps(AVCodecContext *avctx) if (avctx->framerate.num > 0 && avctx->framerate.den > 0) return av_q2d(avctx->framerate); - return 1.0 / av_q2d(avctx->time_base) / FFMAX(avctx->ticks_per_frame, 1); +FF_DISABLE_DEPRECATION_WARNINGS + return 1.0 / av_q2d(avctx->time_base) +#if FF_API_TICKS_PER_FRAME + / FFMAX(avctx->ticks_per_frame, 1) +#endif + ; +FF_ENABLE_DEPRECATION_WARNINGS } static inline double qp2bits(RateControlEntry *rce, double qp) |