1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-07 11:13:41 +02:00

avcodec/ac3dec: fix downmix logic for eac3

Ensure downmixed is only set once during init, as it used to be.

Fixes a regression since acbb2777e2.
Fixes ticket #11321

Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit 0e07a70611)
This commit is contained in:
James Almer 2024-11-24 14:24:47 -03:00
parent f265f9c9d0
commit 364f6a5f11

View File

@ -199,7 +199,6 @@ static void ac3_downmix(AVCodecContext *avctx)
av_channel_layout_uninit(&avctx->ch_layout);
avctx->ch_layout = (AVChannelLayout)AV_CHANNEL_LAYOUT_STEREO;
}
s->downmixed = 1;
}
/**
@ -241,6 +240,7 @@ static av_cold int ac3_decode_init(AVCodecContext *avctx)
avctx->sample_fmt = AV_SAMPLE_FMT_FLTP;
ac3_downmix(avctx);
s->downmixed = 1;
for (i = 0; i < AC3_MAX_CHANNELS; i++) {
s->xcfptr[i] = s->transform_coeffs[i];