mirror of https://github.com/mstorsjo/fdk-aac.git
Fix an assertion failure (avoid division by zero) when encoding a particular input
This commit is contained in:
parent
cf697df5ad
commit
1e3515e03e
|
@ -1147,6 +1147,9 @@ static INT FDKaacEnc_AutoToParcor(
|
||||||
workBuffer++;
|
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));
|
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) ) {
|
if ( fMultDiv2(autoCorr_0, input[0])<FL2FXCONST_DBL(0.0f) ) {
|
||||||
tmp = -tmp;
|
tmp = -tmp;
|
||||||
|
|
Loading…
Reference in New Issue