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/mfenc.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/mfenc.c')
-rw-r--r-- | libavcodec/mfenc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/mfenc.c b/libavcodec/mfenc.c index f3415df10b..8d950a3109 100644 --- a/libavcodec/mfenc.c +++ b/libavcodec/mfenc.c @@ -659,7 +659,11 @@ static int mf_encv_output_adjust(AVCodecContext *avctx, IMFMediaType *type) framerate = avctx->framerate; } else { framerate = av_inv_q(avctx->time_base); +#if FF_API_TICKS_PER_FRAME +FF_DISABLE_DEPRECATION_WARNINGS framerate.den *= avctx->ticks_per_frame; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } ff_MFSetAttributeRatio((IMFAttributes *)type, &MF_MT_FRAME_RATE, framerate.num, framerate.den); |