mirror of https://github.com/mstorsjo/fdk-aac.git
Merge cherrypicks of [12620612, 12620613, 12620936, 12620457, 12616684, 12621005, 12620883, 12620884, 12620846, 12620847, 12620869, 12620848, 12620849, 12620961, 12620962, 12620827, 12620614, 12620197, 12620885, 12620198, 12621039, 12621040, 12621041, 12620937, 12620615, 12620886] into rvc-release
Change-Id: If3dab82f5ef50b669aa488a49aebe27bb6070079
This commit is contained in:
commit
0e9a1509b5
|
@ -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
|
||||
|
@ -617,10 +617,6 @@ SBR_ERROR sbrDecoder_InitElement(
|
|||
self->numSbrChannels -= self->pSbrElement[elementIndex]->nChannels;
|
||||
}
|
||||
|
||||
/* Save element ID for sanity checks and to have a fallback for concealment.
|
||||
*/
|
||||
self->pSbrElement[elementIndex]->elementID = elementID;
|
||||
|
||||
/* Determine amount of channels for this element */
|
||||
switch (elementID) {
|
||||
case ID_NONE:
|
||||
|
@ -653,12 +649,16 @@ SBR_ERROR sbrDecoder_InitElement(
|
|||
}
|
||||
|
||||
/* Sanity check to avoid memory leaks */
|
||||
if (elChannels < self->pSbrElement[elementIndex]->nChannels) {
|
||||
if (elChannels < self->pSbrElement[elementIndex]->nChannels ||
|
||||
(self->numSbrChannels + elChannels) > (8) + (1)) {
|
||||
self->numSbrChannels += self->pSbrElement[elementIndex]->nChannels;
|
||||
sbrError = SBRDEC_PARSE_ERROR;
|
||||
goto bail;
|
||||
}
|
||||
|
||||
/* Save element ID for sanity checks and to have a fallback for concealment.
|
||||
*/
|
||||
self->pSbrElement[elementIndex]->elementID = elementID;
|
||||
self->pSbrElement[elementIndex]->nChannels = elChannels;
|
||||
|
||||
for (ch = 0; ch < elChannels; ch++) {
|
||||
|
|
Loading…
Reference in New Issue