diff --git a/libavcodec/avcodec.c b/libavcodec/avcodec.c index a13b781996..a231bfd689 100644 --- a/libavcodec/avcodec.c +++ b/libavcodec/avcodec.c @@ -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) && diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 8600c43e4f..b92b09553f 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -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. diff --git a/libavcodec/decode.c b/libavcodec/decode.c index cd483528c5..960cf56a92 100644 --- a/libavcodec/decode.c +++ b/libavcodec/decode.c @@ -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; diff --git a/libavcodec/encode.c b/libavcodec/encode.c index 8ca07814ee..4881c599d1 100644 --- a/libavcodec/encode.c +++ b/libavcodec/encode.c @@ -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; } diff --git a/libavcodec/pthread_frame.c b/libavcodec/pthread_frame.c index 2274d3fd7a..8253bab774 100644 --- a/libavcodec/pthread_frame.c +++ b/libavcodec/pthread_frame.c @@ -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; diff --git a/libavcodec/version_major.h b/libavcodec/version_major.h index 06c7f349d8..aa25304af0 100644 --- a/libavcodec/version_major.h +++ b/libavcodec/version_major.h @@ -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)