From cd199a7d69fdef9883fdbf84131dacc4c771c0fc Mon Sep 17 00:00:00 2001 From: James Almer Date: Mon, 15 Jun 2026 10:40:55 -0300 Subject: [PATCH] avcodec/aacenc: fix some layouts with FLC/FRC channels Said channels always come before FL/FR. Signed-off-by: James Almer --- libavcodec/aacenc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c index e46a7ac451..94558ff23f 100644 --- a/libavcodec/aacenc.c +++ b/libavcodec/aacenc.c @@ -214,7 +214,7 @@ static const AACPCEInfo aac_pce_configs[] = { .pairing = { { 1, 1 }, { 0 }, { 1 } }, .index = { { 0, 1 }, { 0 }, { 2 }, }, .config_map = { 3, TYPE_CPE, TYPE_CPE, TYPE_CPE, }, - .reorder_map = { 0, 1, 2, 3, 4, 5 }, + .reorder_map = { 2, 3, 0, 1, 4, 5 }, }, { .layout = AV_CHANNEL_LAYOUT_HEXAGONAL, @@ -246,7 +246,7 @@ static const AACPCEInfo aac_pce_configs[] = { .pairing = { { 1, 1 }, { 0 }, { 1 }, }, .index = { { 0, 1 }, { 0 }, { 2 }, { 0 }, }, .config_map = { 4, TYPE_CPE, TYPE_CPE, TYPE_CPE, TYPE_LFE, }, - .reorder_map = { 0, 1, 3, 4, 5, 6, 2 }, + .reorder_map = { 3, 4, 0, 1, 5, 6, 2 }, }, { .layout = AV_CHANNEL_LAYOUT_7POINT0, @@ -262,7 +262,7 @@ static const AACPCEInfo aac_pce_configs[] = { .pairing = { { 0, 1, 1 }, { 0 }, { 1 }, }, .index = { { 0, 0, 1 }, { 0 }, { 2 }, }, .config_map = { 4, TYPE_SCE, TYPE_CPE, TYPE_CPE, TYPE_CPE }, - .reorder_map = { 2, 0, 1, 3, 4, 5, 6 }, + .reorder_map = { 2, 3, 4, 0, 1, 5, 6 }, }, { .layout = AV_CHANNEL_LAYOUT_7POINT1,