changeset 6961:1cf8c883365f libavcodec

Prevent scalefactors from overflowing. fixes issue351
author michael
date Sun, 01 Jun 2008 01:07:59 +0000
parents cdde357b67d8
children c4e281443310
files mpegaudioenc.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mpegaudioenc.c	Sat May 31 22:12:49 2008 +0000
+++ b/mpegaudioenc.c	Sun Jun 01 01:07:59 2008 +0000
@@ -387,7 +387,7 @@
                     vmax = v;
             }
             /* compute the scale factor index using log 2 computations */
-            if (vmax > 0) {
+            if (vmax > 1) {
                 n = av_log2(vmax);
                 /* n is the position of the MSB of vmax. now
                    use at most 2 compares to find the index */