1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-28 20:53:54 +02:00

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 <jamrial@gmail.com>
This commit is contained in:
James Almer 2022-09-06 10:07:02 -03:00
parent cc867f2c09
commit 5a78421746
2 changed files with 0 additions and 16 deletions

View File

@ -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;
}

View File

@ -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