OSDN Git Service
(root)
/
coroid
/
libav_saccubus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fb2b88a
)
Prevent scalefactors from overflowing.
author
Michael Niedermayer
<michaelni@gmx.at>
Sun, 1 Jun 2008 01:07:59 +0000
(
01:07
+0000)
committer
Michael Niedermayer
<michaelni@gmx.at>
Sun, 1 Jun 2008 01:07:59 +0000
(
01:07
+0000)
fixes issue351
Originally committed as revision 13591 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavcodec/mpegaudioenc.c
patch
|
blob
|
history
diff --git
a/libavcodec/mpegaudioenc.c
b/libavcodec/mpegaudioenc.c
index
f117d31
..
a67ca21
100644
(file)
--- a/
libavcodec/mpegaudioenc.c
+++ b/
libavcodec/mpegaudioenc.c
@@
-387,7
+387,7
@@
static void compute_scale_factors(unsigned char scale_code[SBLIMIT],
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 */