[FFmpeg-cvslog] r13591 - trunk/libavcodec/mpegaudioenc.c
michael
subversion
Sun Jun 1 03:07:59 CEST 2008
Author: michael
Date: Sun Jun 1 03:07:59 2008
New Revision: 13591
Log:
Prevent scalefactors from overflowing.
fixes issue351
Modified:
trunk/libavcodec/mpegaudioenc.c
Modified: trunk/libavcodec/mpegaudioenc.c
==============================================================================
--- trunk/libavcodec/mpegaudioenc.c (original)
+++ trunk/libavcodec/mpegaudioenc.c Sun Jun 1 03:07:59 2008
@@ -387,7 +387,7 @@ static void compute_scale_factors(unsign
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 */
More information about the ffmpeg-cvslog
mailing list