mirror of
https://github.com/mstorsjo/fdk-aac.git
synced 2025-02-16 19:30:34 +01:00
Evaluate and return StoreConfigAsBitstream() error state.
Bug: 176246647 Test: atest DecoderTestXheAac DecoderTestAacDrc Change-Id: I025e943e91f9be1a5259a761a8ff88defd8babea
This commit is contained in:
parent
8f2e68d5c4
commit
fcc3c65ec5
@ -1,7 +1,7 @@
|
|||||||
/* -----------------------------------------------------------------------------
|
/* -----------------------------------------------------------------------------
|
||||||
Software License for The Fraunhofer FDK AAC Codec Library for Android
|
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.
|
Forschung e.V. All rights reserved.
|
||||||
|
|
||||||
1. INTRODUCTION
|
1. INTRODUCTION
|
||||||
@ -1996,9 +1996,11 @@ static TRANSPORTDEC_ERROR UsacConfig_Parse(CSAudioSpecificConfig *asc,
|
|||||||
|
|
||||||
/* Copy UsacConfig() to asc->m_sc.m_usacConfig.UsacConfig[] buffer. */
|
/* Copy UsacConfig() to asc->m_sc.m_usacConfig.UsacConfig[] buffer. */
|
||||||
INT configSize_bits = (INT)FDKgetValidBits(hBs) - nbits;
|
INT configSize_bits = (INT)FDKgetValidBits(hBs) - nbits;
|
||||||
StoreConfigAsBitstream(hBs, configSize_bits,
|
if (StoreConfigAsBitstream(hBs, configSize_bits,
|
||||||
asc->m_sc.m_usacConfig.UsacConfig,
|
asc->m_sc.m_usacConfig.UsacConfig,
|
||||||
TP_USAC_MAX_CONFIG_LEN);
|
TP_USAC_MAX_CONFIG_LEN)) {
|
||||||
|
return TRANSPORTDEC_PARSE_ERROR;
|
||||||
|
}
|
||||||
asc->m_sc.m_usacConfig.UsacConfigBits = fAbs(configSize_bits);
|
asc->m_sc.m_usacConfig.UsacConfigBits = fAbs(configSize_bits);
|
||||||
|
|
||||||
return err;
|
return err;
|
||||||
@ -2300,8 +2302,10 @@ TRANSPORTDEC_ERROR AudioSpecificConfig_Parse(
|
|||||||
/* Copy config() to asc->config[] buffer. */
|
/* Copy config() to asc->config[] buffer. */
|
||||||
if ((ErrorStatus == TRANSPORTDEC_OK) && (self->m_aot == AOT_USAC)) {
|
if ((ErrorStatus == TRANSPORTDEC_OK) && (self->m_aot == AOT_USAC)) {
|
||||||
INT configSize_bits = (INT)FDKgetValidBits(bs) - (INT)ascStartAnchor;
|
INT configSize_bits = (INT)FDKgetValidBits(bs) - (INT)ascStartAnchor;
|
||||||
StoreConfigAsBitstream(bs, configSize_bits, self->config,
|
if (StoreConfigAsBitstream(bs, configSize_bits, self->config,
|
||||||
TP_USAC_MAX_CONFIG_LEN);
|
TP_USAC_MAX_CONFIG_LEN)) {
|
||||||
|
return TRANSPORTDEC_PARSE_ERROR;
|
||||||
|
}
|
||||||
self->configBits = fAbs(configSize_bits);
|
self->configBits = fAbs(configSize_bits);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user