mirror of https://github.com/mstorsjo/fdk-aac.git
Add error path to generateFixFixOnly()
Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: I1f1767403068a9eafd7b20edb96669b71b0110fc
This commit is contained in:
parent
8f5b1e47d6
commit
804f41ac64
|
@ -1145,10 +1145,10 @@ static int sbrGetEnvelope(
|
||||||
\brief Generates frame info for FIXFIXonly frame class used for low delay
|
\brief Generates frame info for FIXFIXonly frame class used for low delay
|
||||||
version
|
version
|
||||||
|
|
||||||
\return nothing
|
\return zero for error, one for correct.
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
static void generateFixFixOnly(FRAME_INFO *hSbrFrameInfo, int tranPosInternal,
|
static int generateFixFixOnly(FRAME_INFO *hSbrFrameInfo, int tranPosInternal,
|
||||||
int numberTimeSlots, const UINT flags) {
|
int numberTimeSlots, const UINT flags) {
|
||||||
int nEnv, i, tranIdx;
|
int nEnv, i, tranIdx;
|
||||||
const int *pTable;
|
const int *pTable;
|
||||||
|
|
||||||
|
@ -1159,12 +1159,11 @@ static void generateFixFixOnly(FRAME_INFO *hSbrFrameInfo, int tranPosInternal,
|
||||||
case 15:
|
case 15:
|
||||||
pTable = FDK_sbrDecoder_envelopeTable_15[tranPosInternal];
|
pTable = FDK_sbrDecoder_envelopeTable_15[tranPosInternal];
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
FDK_ASSERT(0);
|
|
||||||
/* fall through */
|
|
||||||
case 16:
|
case 16:
|
||||||
pTable = FDK_sbrDecoder_envelopeTable_16[tranPosInternal];
|
pTable = FDK_sbrDecoder_envelopeTable_16[tranPosInternal];
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* look number of envelopes in table */
|
/* look number of envelopes in table */
|
||||||
|
@ -1187,6 +1186,8 @@ static void generateFixFixOnly(FRAME_INFO *hSbrFrameInfo, int tranPosInternal,
|
||||||
/* nEnv is always > 1, so nNoiseEnvelopes is always 2 (IEC 14496-3 4.6.19.3.2)
|
/* nEnv is always > 1, so nNoiseEnvelopes is always 2 (IEC 14496-3 4.6.19.3.2)
|
||||||
*/
|
*/
|
||||||
hSbrFrameInfo->nNoiseEnvelopes = 2;
|
hSbrFrameInfo->nNoiseEnvelopes = 2;
|
||||||
|
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -1230,7 +1231,9 @@ static int extractLowDelayGrid(
|
||||||
}
|
}
|
||||||
|
|
||||||
/* calculate borders according to the transient position */
|
/* calculate borders according to the transient position */
|
||||||
generateFixFixOnly(pFrameInfo, temp, numberTimeSlots, flags);
|
if (!generateFixFixOnly(pFrameInfo, temp, numberTimeSlots, flags)) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
/* decode freq res: */
|
/* decode freq res: */
|
||||||
for (k = 0; k < pFrameInfo->nEnvelopes; k++) {
|
for (k = 0; k < pFrameInfo->nEnvelopes; k++) {
|
||||||
|
|
Loading…
Reference in New Issue