aboutsummaryrefslogtreecommitdiffstats
path: root/libAACdec
diff options
context:
space:
mode:
authorJean-Michel Trivi <jmtrivi@google.com>2018-12-27 14:49:05 -0800
committerandroid-build-merger <android-build-merger@google.com>2018-12-27 14:49:05 -0800
commit55efc0ade2f842b08e0cc5751bea2e206a1f408d (patch)
treec8d5c220175cfbc0c2996b852fa23da3694f9c75 /libAACdec
parent207025dc96dfa24027ed86bdce3bc99449e33716 (diff)
parentd6459f539c03df17c6aa75915d31a9d8c8adcca2 (diff)
downloadfdk-aac-55efc0ade2f842b08e0cc5751bea2e206a1f408d.tar.gz
fdk-aac-55efc0ade2f842b08e0cc5751bea2e206a1f408d.tar.bz2
fdk-aac-55efc0ade2f842b08e0cc5751bea2e206a1f408d.zip
Merge changes I97471c4d,I8a8626a8,I1f176740,I10da23ee,I9f9064fb am: ecc96969d7 am: f5512132f3
am: d6459f539c Change-Id: I15844b575d276334d5a960a73cf556f5f82fcff3
Diffstat (limited to 'libAACdec')
-rw-r--r--libAACdec/src/aacdecoder.cpp27
-rw-r--r--libAACdec/src/aacdecoder_lib.cpp1
-rw-r--r--libAACdec/src/channel.cpp1
-rw-r--r--libAACdec/src/conceal.cpp1
4 files changed, 21 insertions, 9 deletions
diff --git a/libAACdec/src/aacdecoder.cpp b/libAACdec/src/aacdecoder.cpp
index 8993927..a529389 100644
--- a/libAACdec/src/aacdecoder.cpp
+++ b/libAACdec/src/aacdecoder.cpp
@@ -234,7 +234,8 @@ void CAacDecoder_SyncQmfMode(HANDLE_AACDECODER self) {
MODE_HQ))) { /* MPS decoder does support the requested mode. */
break;
}
- } /* Fall-through: */
+ }
+ FDK_FALLTHROUGH;
default:
if (self->qmfModeUser == NOT_DEFINED) {
/* Revert in case mpegSurroundDecoder_SetParam() fails. */
@@ -938,6 +939,7 @@ static AAC_DECODER_ERROR CAacDecoder_ExtPayloadParse(
case EXT_SBR_DATA_CRC:
crcFlag = 1;
+ FDK_FALLTHROUGH;
case EXT_SBR_DATA:
if (IS_CHANNEL_ELEMENT(previous_element)) {
SBR_ERROR sbrError;
@@ -1076,6 +1078,7 @@ static AAC_DECODER_ERROR CAacDecoder_ExtPayloadParse(
* intentional. */
break;
}
+ FDK_FALLTHROUGH;
case EXT_FIL:
@@ -1108,12 +1111,13 @@ static AAC_DECODER_ERROR aacDecoder_ParseExplicitMpsAndSbr(
/* get the remaining bits of this frame */
bitCnt = transportDec_GetAuBitsRemaining(self->hInput, 0);
- if ((bitCnt > 0) && (self->flags[0] & AC_SBR_PRESENT) &&
+ if ((self->flags[0] & AC_SBR_PRESENT) &&
(self->flags[0] & (AC_USAC | AC_RSVD50 | AC_ELD | AC_DRM))) {
SBR_ERROR err = SBRDEC_OK;
int chElIdx, numChElements = el_cnt[ID_SCE] + el_cnt[ID_CPE] +
el_cnt[ID_LFE] + el_cnt[ID_USAC_SCE] +
el_cnt[ID_USAC_CPE] + el_cnt[ID_USAC_LFE];
+ INT bitCntTmp = bitCnt;
if (self->flags[0] & AC_USAC) {
chElIdx = numChElements - 1;
@@ -1123,6 +1127,7 @@ static AAC_DECODER_ERROR aacDecoder_ParseExplicitMpsAndSbr(
for (; chElIdx < numChElements; chElIdx += 1) {
MP4_ELEMENT_ID sbrType;
+ SBR_ERROR errTmp;
if (self->flags[0] & (AC_USAC)) {
FDK_ASSERT((self->elements[element_index] == ID_USAC_SCE) ||
(self->elements[element_index] == ID_USAC_CPE));
@@ -1132,19 +1137,21 @@ static AAC_DECODER_ERROR aacDecoder_ParseExplicitMpsAndSbr(
: ID_SCE;
} else
sbrType = self->elements[chElIdx];
- err = sbrDecoder_Parse(self->hSbrDecoder, bs, self->pDrmBsBuffer,
- self->drmBsBufferSize, &bitCnt, -1,
- self->flags[0] & AC_SBRCRC, sbrType, chElIdx,
- self->flags[0], self->elFlags);
- if (err != SBRDEC_OK) {
- break;
+ errTmp = sbrDecoder_Parse(self->hSbrDecoder, bs, self->pDrmBsBuffer,
+ self->drmBsBufferSize, &bitCnt, -1,
+ self->flags[0] & AC_SBRCRC, sbrType, chElIdx,
+ self->flags[0], self->elFlags);
+ if (errTmp != SBRDEC_OK) {
+ err = errTmp;
+ bitCntTmp = bitCnt;
+ bitCnt = 0;
}
}
switch (err) {
case SBRDEC_PARSE_ERROR:
/* Can not go on parsing because we do not
know the length of the SBR extension data. */
- FDKpushFor(bs, bitCnt);
+ FDKpushFor(bs, bitCntTmp);
bitCnt = 0;
break;
case SBRDEC_OK:
@@ -1495,11 +1502,13 @@ CAacDecoder_Init(HANDLE_AACDECODER self, const CSAudioSpecificConfig *asc,
switch (asc->m_aot) {
case AOT_AAC_LC:
self->streamInfo.profile = 1;
+ FDK_FALLTHROUGH;
case AOT_ER_AAC_SCAL:
if (asc->m_sc.m_gaSpecificConfig.m_layer > 0) {
/* aac_scalable_extension_element() currently not supported. */
return AAC_DEC_UNSUPPORTED_FORMAT;
}
+ FDK_FALLTHROUGH;
case AOT_SBR:
case AOT_PS:
case AOT_ER_AAC_LC:
diff --git a/libAACdec/src/aacdecoder_lib.cpp b/libAACdec/src/aacdecoder_lib.cpp
index b528ef1..2860bf6 100644
--- a/libAACdec/src/aacdecoder_lib.cpp
+++ b/libAACdec/src/aacdecoder_lib.cpp
@@ -634,6 +634,7 @@ static AAC_DECODER_ERROR setConcealMethod(
switch (err) {
case PCMDMX_INVALID_HANDLE:
errorStatus = AAC_DEC_INVALID_HANDLE;
+ break;
case PCMDMX_OK:
break;
default:
diff --git a/libAACdec/src/channel.cpp b/libAACdec/src/channel.cpp
index cfffd57..a020034 100644
--- a/libAACdec/src/channel.cpp
+++ b/libAACdec/src/channel.cpp
@@ -592,6 +592,7 @@ AAC_DECODER_ERROR CChannelElement_Read(
line: ~599 */
/* Note: The missing "break" is intentional here, since we need to call
* CBlock_ReadScaleFactorData(). */
+ FDK_FALLTHROUGH;
case scale_factor_data:
if (flags & AC_ER_RVLC) {
diff --git a/libAACdec/src/conceal.cpp b/libAACdec/src/conceal.cpp
index 569d672..5895cb8 100644
--- a/libAACdec/src/conceal.cpp
+++ b/libAACdec/src/conceal.cpp
@@ -1894,6 +1894,7 @@ INT CConcealment_TDFading(
case ConcealState_FadeIn:
idx = cntFadeFrames;
idx -= TDFadeInStopBeforeFullLevel;
+ FDK_FALLTHROUGH;
case ConcealState_Ok:
fadeFactor = pConcealParams->fadeInFactor;
idx = (concealState == ConcealState_Ok) ? -1 : idx;