Commit d314aa0c8f for ffmpeg

commit d314aa0c8fed9d99cc3aa77d2cc4078635b3c765
Author: Michael Niedermayer <michael@niedermayer.cc>
Date:   Sun Oct 11 07:19:20 2026 +0200

    avcodec/aac: do not overwrite avctx->ch_layout when restoring the output configuration

    ff_aac_output_configure() copies the restored layout into avctx->ch_layout,
    the plain assignment before it dropped whatever avctx->ch_layout owned.

    This is hardening, no leak was replicated.
    Found during the review of https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24677

diff --git a/libavcodec/aac/aacdec.c b/libavcodec/aac/aacdec.c
index fdebe139c3..66ab648016 100644
--- a/libavcodec/aac/aacdec.c
+++ b/libavcodec/aac/aacdec.c
@@ -472,7 +472,6 @@ static void pop_output_configuration(AACDecContext *ac)
     if (ac->oc[1].status != OC_LOCKED && ac->oc[0].status != OC_NONE) {
         copy_oc(&ac->oc[1], &ac->oc[0]);

-        ac->avctx->ch_layout = ac->oc[1].ch_layout;
         ff_aac_output_configure(ac, ac->oc[1].layout_map, ac->oc[1].layout_map_tags,
                                 ac->oc[1].status, 0);
     }