From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 100E044A72 for ; Mon, 31 Oct 2022 21:16:17 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 53CF068BDFF; Mon, 31 Oct 2022 23:16:14 +0200 (EET) Received: from mail-oa1-f49.google.com (mail-oa1-f49.google.com [209.85.160.49]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id ECF9068BD6B for ; Mon, 31 Oct 2022 23:16:07 +0200 (EET) Received: by mail-oa1-f49.google.com with SMTP id 586e51a60fabf-1322d768ba7so14865142fac.5 for ; Mon, 31 Oct 2022 14:16:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=wXK0ITM7oCnXxT3K3ympAEgq0r+gR5JSsxccejbYp48=; b=G3Wemnree7lsYbNPNfuaAIif+GQEWs5It5yyctiSwtlctGK2FBeQKkJqGmIkfRzWde HbbLwwScc9C+Z8vis5qZ8icS9mjJmqKcWlzUkwcpzWNbYdrElbTjeL/2f9/Vf4u6Qisg sTIZiIHa3kCXbVCJ7VzPDNYRbDOZadfESnVsidfgLwbfVkjRDzzETULmHjn9dU38wQN6 4SQdcHJZqMlvg0KqoxMoFZBXgL0DIZDPUcDQDdXR1iNdO9C9jJrLjMLF5Q0+NBroZF1F a3gLIrV8VnWcpH4r+zRbogae4fcSsP37gOIHcCYHv2/H6ioFW1u0YGf19VY5D4145Xd4 gdxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=wXK0ITM7oCnXxT3K3ympAEgq0r+gR5JSsxccejbYp48=; b=OH5ddruyw0R/zcE5FO6Hgu61uroTaKhU7VZWCaYI2qeO7xGHuUfZdSlDSWKR6pnieV LnwHgBReVYkpGhmA4Nwone/nXH3ELoGrqcalQJWBh4C7s18UcB6mu3I2/azNfD70dW18 C0C3TSF14/XTXp02aS4pGl4YEz2RODAGGPb26veVwKEzrZjx/BsUQ506HPQmmMY1lkSw ho1eKspNo89qVSrSvbPsNdW3cIE0UCyQGMSRwm5U2qqGrEBltn8TRKwyeI7lS4jnGDLh ZjFEsWVqabgqRRT/3PZkK+M2IA12N7otqm1AXc8SaJLdiS+s7MpEDOuyrtrySTV4t1GX TPHw== X-Gm-Message-State: ACrzQf0JThF6RqCsOVAaAdyEBvUrUyP6jRd7+P+vBjPlIdcFoUkj/nne rbsYvV2TssxpG88EwRABVs8choI63qs= X-Google-Smtp-Source: AMsMyM4enNyC9UwZn8S7zqN/aCqx0HZePzq00df7uZubh62MaNK9rdv11DMGUnTkZqGnzBTyfKwX1w== X-Received: by 2002:a05:6870:4607:b0:127:fd93:4752 with SMTP id z7-20020a056870460700b00127fd934752mr18136850oao.64.1667250966005; Mon, 31 Oct 2022 14:16:06 -0700 (PDT) Received: from localhost.localdomain ([191.97.187.183]) by smtp.gmail.com with ESMTPSA id k44-20020a9d19af000000b0063696cbb6bdsm3147091otk.62.2022.10.31.14.16.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Oct 2022 14:16:05 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 31 Oct 2022 18:15:49 -0300 Message-Id: <20221031211554.8176-1-jamrial@gmail.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/6 v3] avcodec/aacdec: fix parsing streams with channel configuration 11 X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Set the correct amount of tags in tags_per_config[]. Also, there are no channels that correspond to a side element in this configuration, so reflect this in the list of known/supported channel layouts. Signed-off-by: James Almer --- libavcodec/aacdec_template.c | 4 +--- libavcodec/aacdectab.h | 6 +++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/libavcodec/aacdec_template.c b/libavcodec/aacdec_template.c index 4a9513d53e..c10bc743b6 100644 --- a/libavcodec/aacdec_template.c +++ b/libavcodec/aacdec_template.c @@ -731,9 +731,7 @@ static ChannelElement *get_che(AACContext *ac, int type, int elem_id) return ac->tag_che_map[TYPE_CPE][elem_id] = ac->che[TYPE_CPE][2]; } case 11: - if (ac->tags_mapped == 2 && - ac->oc[1].m4ac.chan_config == 11 && - type == TYPE_SCE) { + if (ac->tags_mapped == 3 && type == TYPE_SCE) { ac->tags_mapped++; return ac->tag_che_map[TYPE_SCE][elem_id] = ac->che[TYPE_SCE][1]; } diff --git a/libavcodec/aacdectab.h b/libavcodec/aacdectab.h index e38b93a534..327efbcde0 100644 --- a/libavcodec/aacdectab.h +++ b/libavcodec/aacdectab.h @@ -35,7 +35,7 @@ #include -static const int8_t tags_per_config[16] = { 0, 1, 1, 2, 3, 3, 4, 5, 0, 0, 0, 4, 5, 16, 5, 0 }; +static const int8_t tags_per_config[16] = { 0, 1, 1, 2, 3, 3, 4, 5, 0, 0, 0, 5, 5, 16, 5, 0 }; static const uint8_t aac_channel_layout_map[16][16][3] = { { { TYPE_SCE, 0, AAC_CHANNEL_FRONT }, }, @@ -81,7 +81,7 @@ static const uint64_t aac_channel_layout[] = { AV_CH_LAYOUT_5POINT0_BACK, AV_CH_LAYOUT_5POINT1_BACK, AV_CH_LAYOUT_7POINT1_WIDE_BACK, - AV_CH_LAYOUT_6POINT1, + AV_CH_LAYOUT_6POINT1_BACK, AV_CH_LAYOUT_7POINT1, AV_CH_LAYOUT_22POINT2, 0, @@ -97,7 +97,7 @@ static const AVChannelLayout aac_ch_layout[] = { AV_CHANNEL_LAYOUT_5POINT0_BACK, AV_CHANNEL_LAYOUT_5POINT1_BACK, AV_CHANNEL_LAYOUT_7POINT1_WIDE_BACK, - AV_CHANNEL_LAYOUT_6POINT1, + AV_CHANNEL_LAYOUT_6POINT1_BACK, AV_CHANNEL_LAYOUT_7POINT1, AV_CHANNEL_LAYOUT_22POINT2, { 0 }, -- 2.38.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".