From 5a78421746e9406c388407d5625c1c416775ba54 Mon Sep 17 00:00:00 2001 From: James Almer Date: Tue, 6 Sep 2022 10:07:02 -0300 Subject: [PATCH] avcodec/decode: remove superfluous initial channels fields They are internal, so there's no need to keep them around as they are just duplicate functionality. Signed-off-by: James Almer --- libavcodec/decode.c | 12 ------------ libavcodec/internal.h | 4 ---- 2 files changed, 16 deletions(-) diff --git a/libavcodec/decode.c b/libavcodec/decode.c index 75373989c6..2961705c9d 100644 --- a/libavcodec/decode.c +++ b/libavcodec/decode.c @@ -735,12 +735,6 @@ int ff_decode_receive_frame(AVCodecContext *avctx, AVFrame *frame) case AVMEDIA_TYPE_AUDIO: avci->initial_sample_rate = frame->sample_rate ? frame->sample_rate : avctx->sample_rate; -#if FF_API_OLD_CHANNEL_LAYOUT -FF_DISABLE_DEPRECATION_WARNINGS - avci->initial_channels = frame->ch_layout.nb_channels; - avci->initial_channel_layout = frame->channel_layout; -FF_ENABLE_DEPRECATION_WARNINGS -#endif ret = av_channel_layout_copy(&avci->initial_ch_layout, &frame->ch_layout); if (ret < 0) { av_frame_unref(frame); @@ -759,15 +753,9 @@ FF_ENABLE_DEPRECATION_WARNINGS avci->initial_height != frame->height; break; case AVMEDIA_TYPE_AUDIO: -FF_DISABLE_DEPRECATION_WARNINGS changed |= avci->initial_sample_rate != frame->sample_rate || avci->initial_sample_rate != avctx->sample_rate || -#if FF_API_OLD_CHANNEL_LAYOUT - avci->initial_channels != frame->channels || - avci->initial_channel_layout != frame->channel_layout || -#endif av_channel_layout_compare(&avci->initial_ch_layout, &frame->ch_layout); -FF_ENABLE_DEPRECATION_WARNINGS break; } diff --git a/libavcodec/internal.h b/libavcodec/internal.h index e2a914c271..35e3dd303a 100644 --- a/libavcodec/internal.h +++ b/libavcodec/internal.h @@ -153,10 +153,6 @@ typedef struct AVCodecInternal { int initial_format; int initial_width, initial_height; int initial_sample_rate; -#if FF_API_OLD_CHANNEL_LAYOUT - int initial_channels; - uint64_t initial_channel_layout; -#endif AVChannelLayout initial_ch_layout; #if CONFIG_LCMS2