[FFmpeg-cvslog] aacpsy: calc_reduction_3gpp() handle active_lines = 0

Michael Niedermayer git at videolan.org
Fri Sep 14 03:35:42 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Sep 14 03:26:19 2012 +0200| [413b32f80890bd6dd8820098c88f632842973d7e] | committer: Michael Niedermayer

aacpsy: calc_reduction_3gpp() handle active_lines = 0

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=413b32f80890bd6dd8820098c88f632842973d7e
---

 libavcodec/aacpsy.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavcodec/aacpsy.c b/libavcodec/aacpsy.c
index 0d44c00..93370b8 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;
 



More information about the ffmpeg-cvslog mailing list