aboutsummaryrefslogtreecommitdiffstats
path: root/libMpegTPDec/src/tpdec_asc.cpp
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2020-12-28 18:34:58 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2020-12-28 18:34:58 +0000
commite1f4578a40f070fe5bb47eed28854436884b1d7e (patch)
treefbb39310a9e37c2d27b16b64f4fce5d7881695e6 /libMpegTPDec/src/tpdec_asc.cpp
parentd4fb5f5374866cba82bab4e7a99e904875e4d092 (diff)
parentbfd912da32b1253c9020a82d5520f1754dadcfc5 (diff)
downloadfdk-aac-e1f4578a40f070fe5bb47eed28854436884b1d7e.tar.gz
fdk-aac-e1f4578a40f070fe5bb47eed28854436884b1d7e.tar.bz2
fdk-aac-e1f4578a40f070fe5bb47eed28854436884b1d7e.zip
Merge changes I6aaeef87,I9681942b,I60ac86f0,I025e943e,I75edf24b
* changes: Improve decoder robustness by storing flags and elFlags temporarily. ELD downscale factor 3 is only allowed for framesize 480. Check transportDec_OutOfBandConfig() input buffer size parameter. Evaluate and return StoreConfigAsBitstream() error state. Introduce aacDecoder_drcDisable() and always disable legacy DRC for USAC.
Diffstat (limited to 'libMpegTPDec/src/tpdec_asc.cpp')
-rw-r--r--libMpegTPDec/src/tpdec_asc.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/libMpegTPDec/src/tpdec_asc.cpp b/libMpegTPDec/src/tpdec_asc.cpp
index 82f840e..ffe85c1 100644
--- a/libMpegTPDec/src/tpdec_asc.cpp
+++ b/libMpegTPDec/src/tpdec_asc.cpp
@@ -1,7 +1,7 @@
/* -----------------------------------------------------------------------------
Software License for The Fraunhofer FDK AAC Codec Library for Android
-© Copyright 1995 - 2019 Fraunhofer-Gesellschaft zur Förderung der angewandten
+© Copyright 1995 - 2020 Fraunhofer-Gesellschaft zur Förderung der angewandten
Forschung e.V. All rights reserved.
1. INTRODUCTION
@@ -1996,9 +1996,11 @@ static TRANSPORTDEC_ERROR UsacConfig_Parse(CSAudioSpecificConfig *asc,
/* Copy UsacConfig() to asc->m_sc.m_usacConfig.UsacConfig[] buffer. */
INT configSize_bits = (INT)FDKgetValidBits(hBs) - nbits;
- StoreConfigAsBitstream(hBs, configSize_bits,
- asc->m_sc.m_usacConfig.UsacConfig,
- TP_USAC_MAX_CONFIG_LEN);
+ if (StoreConfigAsBitstream(hBs, configSize_bits,
+ asc->m_sc.m_usacConfig.UsacConfig,
+ TP_USAC_MAX_CONFIG_LEN)) {
+ return TRANSPORTDEC_PARSE_ERROR;
+ }
asc->m_sc.m_usacConfig.UsacConfigBits = fAbs(configSize_bits);
return err;
@@ -2300,8 +2302,10 @@ TRANSPORTDEC_ERROR AudioSpecificConfig_Parse(
/* Copy config() to asc->config[] buffer. */
if ((ErrorStatus == TRANSPORTDEC_OK) && (self->m_aot == AOT_USAC)) {
INT configSize_bits = (INT)FDKgetValidBits(bs) - (INT)ascStartAnchor;
- StoreConfigAsBitstream(bs, configSize_bits, self->config,
- TP_USAC_MAX_CONFIG_LEN);
+ if (StoreConfigAsBitstream(bs, configSize_bits, self->config,
+ TP_USAC_MAX_CONFIG_LEN)) {
+ return TRANSPORTDEC_PARSE_ERROR;
+ }
self->configBits = fAbs(configSize_bits);
}