From e0623aa03aab8856c50eb8d0251b98282f290261 Mon Sep 17 00:00:00 2001 From: Matej Knopp Date: Mon, 1 Jun 2020 12:45:36 +0200 Subject: [PATCH] codec-utils: properly determine AAC Level MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Table 1.10 – "Levels for the AAC Profile" only goes to 5 max channels / 7 max channel post amendmend, so I assume the number of channels should not include LFE, otherwise there's no valid level for 5.1 resp. 7.1 (post amendmend) Part-of: --- gst-libs/gst/pbutils/codec-utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst-libs/gst/pbutils/codec-utils.c b/gst-libs/gst/pbutils/codec-utils.c index 3d6d30a1fb..9714f80428 100644 --- a/gst-libs/gst/pbutils/codec-utils.c +++ b/gst-libs/gst/pbutils/codec-utils.c @@ -448,7 +448,7 @@ gst_codec_utils_aac_get_level (const guint8 * audio_config, guint len) else rcu += (rcu_ref + (rcu_ref - 1) * ((2 * num_cpe) - 1)); - num_channels = num_sce + (2 * num_cpe) + num_lfe; + num_channels = num_sce + (2 * num_cpe); if (audio_object_type == 2) { /* AAC LC => return the level as per the 'AAC Profile' */