This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit 66a8d8cff4daabf32fc98ceec0c1fcf330fa88ac
Author:     James Almer <[email protected]>
AuthorDate: Mon Aug 24 22:06:52 2026 -0300
Commit:     James Almer <[email protected]>
CommitDate: Wed Aug 26 12:28:53 2026 -0300

    avcodec/libfdk-aacdec: add support for top back and top side channels
    
    While PCE can signal these, libfdk-aac supports only up to 8 channels, so 
any sample
    that could contain these will most likely have more channels than can be 
decoded anyway.
    
    Signed-off-by: James Almer <[email protected]>
---
 libavcodec/libfdk-aacdec.c | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/libavcodec/libfdk-aacdec.c b/libavcodec/libfdk-aacdec.c
index d1008e2a36..9aa9ef5e09 100644
--- a/libavcodec/libfdk-aacdec.c
+++ b/libavcodec/libfdk-aacdec.c
@@ -239,6 +239,42 @@ static int get_stream_info(AVCodecContext *avctx, AVFrame 
*frame)
             break;
         }
     }
+    if (channel_counts[ACT_BACK_TOP] > 0) {
+        switch (channel_counts[ACT_BACK_TOP]) {
+        case 3:
+        case 2:
+            ch_layout |= AV_CH_TOP_BACK_LEFT | AV_CH_TOP_BACK_RIGHT;
+            av_fallthrough;
+        case 1:
+            if (channel_counts[ACT_BACK_TOP] & 1)
+                ch_layout |= AV_CH_TOP_BACK_CENTER;
+            break;
+        default:
+            av_log(avctx, AV_LOG_WARNING,
+                   "unsupported number of top back channels: %d\n",
+                   channel_counts[ACT_BACK_TOP]);
+            ch_error = 1;
+            break;
+        }
+    }
+    if (channel_counts[ACT_SIDE_TOP] > 0) {
+        switch (channel_counts[ACT_SIDE_TOP]) {
+        case 3:
+        case 2:
+            ch_layout |= AV_CH_TOP_SIDE_LEFT | AV_CH_TOP_SIDE_RIGHT;
+            av_fallthrough;
+        case 1:
+            if (channel_counts[ACT_SIDE_TOP] & 1)
+                ch_layout |= AV_CH_TOP_CENTER;
+            break;
+        default:
+            av_log(avctx, AV_LOG_WARNING,
+                   "unsupported number of top side channels: %d\n",
+                   channel_counts[ACT_SIDE_TOP]);
+            ch_error = 1;
+            break;
+        }
+    }
 
     av_channel_layout_uninit(&avctx->ch_layout);
     av_channel_layout_from_mask(&avctx->ch_layout, ch_layout);

-- 
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to