projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
87a8443
)
Fix an integer overflow in the AAC encoder.
author
Alex Converse
<alex.converse@gmail.com>
Mon, 20 Jul 2009 18:27:17 +0000
(18:27 +0000)
committer
Alex Converse
<alex.converse@gmail.com>
Mon, 20 Jul 2009 18:27:17 +0000
(18:27 +0000)
Originally committed as revision 19470 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavcodec/aaccoder.c
patch
|
blob
|
history
diff --git
a/libavcodec/aaccoder.c
b/libavcodec/aaccoder.c
index
3b6ec96
..
97a5912
100644
(file)
--- a/
libavcodec/aaccoder.c
+++ b/
libavcodec/aaccoder.c
@@
-72,8
+72,8
@@
static void quantize_bands(int (*out)[2], const float *in, const float *scaled,
double qc;
for (i = 0; i < size; i++) {
qc = scaled[i] * Q34;
- out[i][0] = (int)FFMIN(
(int)qc,
maxval);
- out[i][1] = (int)FFMIN(
(int)(qc + 0.4054),
maxval);
+ out[i][0] = (int)FFMIN(
qc, (double)
maxval);
+ out[i][1] = (int)FFMIN(
qc + 0.4054, (double)
maxval);
if (is_signed && in[i] < 0.0f) {
out[i][0] = -out[i][0];
out[i][1] = -out[i][1];