mirror of
https://github.com/mstorsjo/fdk-aac.git
synced 2025-06-05 22:39:13 +02:00
Fix an assertion failure (avoid division by zero) when encoding a particular input
This commit is contained in:
@@ -1147,6 +1147,9 @@ static INT FDKaacEnc_AutoToParcor(
|
||||
workBuffer++;
|
||||
}
|
||||
|
||||
if (input[0] == 0)
|
||||
input[0] = 1;
|
||||
|
||||
tmp = fMult((FIXP_DBL)((LONG)TNS_PREDGAIN_SCALE<<21), fDivNorm(fAbs(autoCorr_0), fAbs(input[0]), &scale));
|
||||
if ( fMultDiv2(autoCorr_0, input[0])<FL2FXCONST_DBL(0.0f) ) {
|
||||
tmp = -tmp;
|
||||
|
Reference in New Issue
Block a user