aboutsummaryrefslogtreecommitdiffstats
path: root/libMpegTPDec
diff options
context:
space:
mode:
authorFraunhofer IIS FDK <audio-fdk@iis.fraunhofer.de>2018-10-19 16:43:26 +0200
committerJean-Michel Trivi <jmtrivi@google.com>2018-12-27 17:34:06 -0500
commit3cc09916b0aa9b9f223ed895774947267caf6d0e (patch)
tree39eae65c9f9edae41ea389d510becc413afc0a9d /libMpegTPDec
parent55d2c9582ad0698deb885440e0e5db48bdc1ed24 (diff)
downloadfdk-aac-3cc09916b0aa9b9f223ed895774947267caf6d0e.tar.gz
fdk-aac-3cc09916b0aa9b9f223ed895774947267caf6d0e.tar.bz2
fdk-aac-3cc09916b0aa9b9f223ed895774947267caf6d0e.zip
Setup lowdelay SBR LFE element via SBR callback
Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: I76ed994be312b6e718591db129e84b6be8ab214d
Diffstat (limited to 'libMpegTPDec')
-rw-r--r--libMpegTPDec/src/tpdec_asc.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/libMpegTPDec/src/tpdec_asc.cpp b/libMpegTPDec/src/tpdec_asc.cpp
index 6260cad..3b61eef 100644
--- a/libMpegTPDec/src/tpdec_asc.cpp
+++ b/libMpegTPDec/src/tpdec_asc.cpp
@@ -1300,7 +1300,11 @@ static INT ld_sbr_header(CSAudioSpecificConfig *asc, const INT dsFactor,
/* read elements of the passed channel_configuration until there is ID_NONE */
while ((element = channel_configuration_array[channelConfiguration][j]) !=
ID_NONE) {
- if (element == ID_SCE || element == ID_CPE) {
+ /* Setup LFE element for upsampling too. This is essential especially for
+ * channel configs where the LFE element is not at the last position for
+ * example in channel config 13 or 14. It leads to memory leaks if the setup
+ * of the LFE element would be done later in the core. */
+ if (element == ID_SCE || element == ID_CPE || element == ID_LFE) {
error |= cb->cbSbr(
cb->cbSbrData, hBs, asc->m_samplingFrequency / dsFactor,
asc->m_extensionSamplingFrequency / dsFactor,