avcodec: remove deprecated FF_API_AVCTX_FRAME_NUMBER

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer 2024-01-20 10:31:56 -03:00
parent 7bca8ce422
commit 2717dcfb85
6 changed files with 0 additions and 46 deletions

View File

@ -282,11 +282,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
}
avctx->frame_num = 0;
#if FF_API_AVCTX_FRAME_NUMBER
FF_DISABLE_DEPRECATION_WARNINGS
avctx->frame_number = avctx->frame_num;
FF_ENABLE_DEPRECATION_WARNINGS
#endif
avctx->codec_descriptor = avcodec_descriptor_get(avctx->codec_id);
if ((avctx->codec->capabilities & AV_CODEC_CAP_EXPERIMENTAL) &&

View File

@ -1095,21 +1095,6 @@ typedef struct AVCodecContext {
*/
int frame_size;
#if FF_API_AVCTX_FRAME_NUMBER
/**
* Frame counter, set by libavcodec.
*
* - decoding: total number of frames returned from the decoder so far.
* - encoding: total number of frames passed to the encoder so far.
*
* @note the counter is not incremented if encoding/decoding resulted in
* an error.
* @deprecated use frame_num instead
*/
attribute_deprecated
int frame_number;
#endif
/**
* number of bytes per packet if constant and known or 0
* Used by some WAV based audio codecs.

View File

@ -820,11 +820,6 @@ int ff_decode_receive_frame(AVCodecContext *avctx, AVFrame *frame)
}
avctx->frame_num++;
#if FF_API_AVCTX_FRAME_NUMBER
FF_DISABLE_DEPRECATION_WARNINGS
avctx->frame_number = avctx->frame_num;
FF_ENABLE_DEPRECATION_WARNINGS
#endif
#if FF_API_DROPCHANGED
if (avctx->flags & AV_CODEC_FLAG_DROPCHANGED) {
@ -1032,11 +1027,6 @@ int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub,
if (*got_sub_ptr)
avctx->frame_num++;
#if FF_API_AVCTX_FRAME_NUMBER
FF_DISABLE_DEPRECATION_WARNINGS
avctx->frame_number = avctx->frame_num;
FF_ENABLE_DEPRECATION_WARNINGS
#endif
}
return ret;

View File

@ -198,11 +198,6 @@ int avcodec_encode_subtitle(AVCodecContext *avctx, uint8_t *buf, int buf_size,
ret = ffcodec(avctx->codec)->cb.encode_sub(avctx, buf, buf_size, sub);
avctx->frame_num++;
#if FF_API_AVCTX_FRAME_NUMBER
FF_DISABLE_DEPRECATION_WARNINGS
avctx->frame_number = avctx->frame_num;
FF_ENABLE_DEPRECATION_WARNINGS
#endif
return ret;
}
@ -544,11 +539,6 @@ int attribute_align_arg avcodec_send_frame(AVCodecContext *avctx, const AVFrame
}
avctx->frame_num++;
#if FF_API_AVCTX_FRAME_NUMBER
FF_DISABLE_DEPRECATION_WARNINGS
avctx->frame_number = avctx->frame_num;
FF_ENABLE_DEPRECATION_WARNINGS
#endif
return 0;
}

View File

@ -418,11 +418,6 @@ static int update_context_from_user(AVCodecContext *dst, const AVCodecContext *s
dst->skip_frame = src->skip_frame;
dst->frame_num = src->frame_num;
#if FF_API_AVCTX_FRAME_NUMBER
FF_DISABLE_DEPRECATION_WARNINGS
dst->frame_number = src->frame_number;
FF_ENABLE_DEPRECATION_WARNINGS
#endif
#if FF_API_REORDERED_OPAQUE
FF_DISABLE_DEPRECATION_WARNINGS
dst->reordered_opaque = src->reordered_opaque;

View File

@ -38,7 +38,6 @@
*/
#define FF_API_INIT_PACKET (LIBAVCODEC_VERSION_MAJOR < 61)
#define FF_API_AVCTX_FRAME_NUMBER (LIBAVCODEC_VERSION_MAJOR < 61)
#define FF_API_SLICE_OFFSET (LIBAVCODEC_VERSION_MAJOR < 61)
#define FF_API_SUBFRAMES (LIBAVCODEC_VERSION_MAJOR < 61)
#define FF_API_TICKS_PER_FRAME (LIBAVCODEC_VERSION_MAJOR < 61)