aboutsummaryrefslogtreecommitdiffstats
path: root/libMpegTPDec
diff options
context:
space:
mode:
authorJean-Michel Trivi <jmtrivi@google.com>2018-12-28 15:12:00 -0800
committerandroid-build-merger <android-build-merger@google.com>2018-12-28 15:12:00 -0800
commit7e454bd098434338fa6da8d4a8164762d3abed0f (patch)
tree39eae65c9f9edae41ea389d510becc413afc0a9d /libMpegTPDec
parent45903f4e5a1275df8508ccb97623bf6d189249bd (diff)
parent3e0a7a40c5ed198850b061ac0127f19b43a20b82 (diff)
downloadfdk-aac-7e454bd098434338fa6da8d4a8164762d3abed0f.tar.gz
fdk-aac-7e454bd098434338fa6da8d4a8164762d3abed0f.tar.bz2
fdk-aac-7e454bd098434338fa6da8d4a8164762d3abed0f.zip
Merge "Setup lowdelay SBR LFE element via SBR callback"
am: 3e0a7a40c5 Change-Id: I254336ec48ef2b95188a52b7f5377f7c84071944
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,