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/encode.c | |
parent | 2953ebe7b6925b045e5652420cf07146fbbb17ab (diff) | |
download | ffmpeg-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/encode.c')
-rw-r--r-- | libavcodec/encode.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/encode.c b/libavcodec/encode.c index 14e2876742..ab5f889615 100644 --- a/libavcodec/encode.c +++ b/libavcodec/encode.c @@ -582,6 +582,8 @@ static int encode_preinit_video(AVCodecContext *avctx) return AVERROR(EINVAL); } +#if FF_API_TICKS_PER_FRAME +FF_DISABLE_DEPRECATION_WARNINGS if (avctx->ticks_per_frame && avctx->time_base.num && avctx->ticks_per_frame > INT_MAX / avctx->time_base.num) { av_log(avctx, AV_LOG_ERROR, @@ -591,6 +593,8 @@ static int encode_preinit_video(AVCodecContext *avctx) avctx->time_base.den); return AVERROR(EINVAL); } +FF_ENABLE_DEPRECATION_WARNINGS +#endif if (avctx->hw_frames_ctx) { AVHWFramesContext *frames_ctx = (AVHWFramesContext*)avctx->hw_frames_ctx->data; |