Commit 570931d4 authored by Michael Niedermayer's avatar Michael Niedermayer

aacpsy: psy_3gpp_analyze_channel() handle energy == 0

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 413b32f8
......@@ -588,7 +588,7 @@ static void psy_3gpp_analyze_channel(FFPsyContext *ctx, int channel,
form_factor += sqrtf(fabs(coefs[start+i]));
}
band->thr = band->energy * 0.001258925f;
band->nz_lines = form_factor / powf(band->energy / band_sizes[g], 0.25f);
band->nz_lines = band->energy>0 ? form_factor / powf(band->energy / band_sizes[g], 0.25f) : 0;
start += band_sizes[g];
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment