aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2024-11-24 14:24:47 -0300
committerJames Almer <jamrial@gmail.com>2024-11-25 14:40:15 -0300
commit0e07a70611dc109f4e84895ffc79827a91edc045 (patch)
tree039e8ebb851efd4741c064e499a6b7be9bc5fc3a
parentf8e91ab05ff3d111626ab8a3b5d570865a934f07 (diff)
downloadffmpeg-0e07a70611dc109f4e84895ffc79827a91edc045.tar.gz
avcodec/ac3dec: fix downmix logic for eac3
Ensure downmixed is only set once during init, as it used to be. Fixes a regression since acbb2777e28c. Fixes ticket #11321 Signed-off-by: James Almer <jamrial@gmail.com>
-rw-r--r--libavcodec/ac3dec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c
index 0a4d3375ee..3cc20f32a9 100644
--- a/libavcodec/ac3dec.c
+++ b/libavcodec/ac3dec.c
@@ -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];