aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-09-14 03:26:19 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-09-14 03:26:19 +0200
commit413b32f80890bd6dd8820098c88f632842973d7e (patch)
tree0ca2f3b8ddebf4d914abb3d629072da159421c00
parent062091f87f4cbef1cb6c2889e526d8640b795875 (diff)
downloadffmpeg-413b32f80890bd6dd8820098c88f632842973d7e.tar.gz
aacpsy: calc_reduction_3gpp() handle active_lines = 0
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/aacpsy.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/aacpsy.c b/libavcodec/aacpsy.c
index 0d44c00cd2..93370b8761 100644
--- a/libavcodec/aacpsy.c
+++ b/libavcodec/aacpsy.c
@@ -526,6 +526,9 @@ static float calc_reduction_3gpp(float a, float desired_pe, float pe,
{
float thr_avg, reduction;
+ if(active_lines == 0.0)
+ return 0;
+
thr_avg = exp2f((a - pe) / (4.0f * active_lines));
reduction = exp2f((a - desired_pe) / (4.0f * active_lines)) - thr_avg;