Ensure downmixed is only set once during init, as it used to be. Fixes a regression since acbb2777e28c. Fixes ticket #11321
Showing the changes to libavcodec (1 of 1 file). Show all
Unified · Split
| @@ -199,7 +199,6 @@ static void ac3_downmix(AVCodecContext *avctx) · 198 unmodified lines | |||
| 199 | av_channel_layout_uninit(&avctx->ch_layout); | 199 | av_channel_layout_uninit(&avctx->ch_layout); |
| 200 | avctx->ch_layout = (AVChannelLayout)AV_CHANNEL_LAYOUT_STEREO; | 200 | avctx->ch_layout = (AVChannelLayout)AV_CHANNEL_LAYOUT_STEREO; |
| 201 | } | 201 | } |
| 202 | s->downmixed = 1; | ||
| 203 | } | 202 | } |
| 204 | 203 | ||
| 205 | /** | 204 | /** |
| @@ -241,6 +240,7 @@ static av_cold int ac3_decode_init(AVCodecContext *avctx) · 35 unmodified lines | |||
| 241 | avctx->sample_fmt = AV_SAMPLE_FMT_FLTP; | 240 | avctx->sample_fmt = AV_SAMPLE_FMT_FLTP; |
| 242 | 241 | ||
| 243 | ac3_downmix(avctx); | 242 | ac3_downmix(avctx); |
| 243 | s->downmixed = 1; | ||
| 244 | 244 | ||
| 245 | for (i = 0; i < AC3_MAX_CHANNELS; i++) { | 245 | for (i = 0; i < AC3_MAX_CHANNELS; i++) { |
| 246 | s->xcfptr[i] = s->transform_coeffs[i]; | 246 | s->xcfptr[i] = s->transform_coeffs[i]; |