[FFmpeg-cvslog] avcodec/aac/aacdec: Fix -Wdeclaration-after-statement

Andreas Rheinhardt git at videolan.org
Sun Jan 12 17:00:05 EET 2025


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Wed Jan  8 20:16:41 2025 +0100| [0bc1d2fac4d61fc2ca02bfedf0ef256bc3bccb7f] | committer: Andreas Rheinhardt

avcodec/aac/aacdec: Fix -Wdeclaration-after-statement

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0bc1d2fac4d61fc2ca02bfedf0ef256bc3bccb7f
---

 libavcodec/aac/aacdec.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/aac/aacdec.c b/libavcodec/aac/aacdec.c
index e76392c88d..c0850853b4 100644
--- a/libavcodec/aac/aacdec.c
+++ b/libavcodec/aac/aacdec.c
@@ -1104,13 +1104,13 @@ static av_cold int decode_close(AVCodecContext *avctx)
 
     for (int i = 0; i < 2; i++) {
         OutputConfiguration *oc = &ac->oc[i];
-        av_channel_layout_uninit(&ac->oc[i].ch_layout);
-
         AACUSACConfig *usac = &oc->usac;
         for (int j = 0; j < usac->nb_elems; j++) {
             AACUsacElemConfig *ec = &usac->elems[j];
             av_freep(&ec->ext.pl_data);
         }
+
+        av_channel_layout_uninit(&ac->oc[i].ch_layout);
     }
 
     for (int type = 0; type < FF_ARRAY_ELEMS(ac->che); type++) {



More information about the ffmpeg-cvslog mailing list