Browse Source

aacpsy: psy_3gpp_analyze_channel() handle energy == 0

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n1.0
Michael Niedermayer 13 years ago
parent
commit
570931d411
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/aacpsy.c

+ 1
- 1
libavcodec/aacpsy.c View File

@@ -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];
}


Loading…
Cancel
Save