Mercurial > libavcodec.hg
changeset 9965:27339a7fee03 libavcodec
Fix an integer overflow in the AAC encoder.
author | alexc |
---|---|
date | Mon, 20 Jul 2009 18:27:17 +0000 |
parents | aad612d229b4 |
children | fd487090d901 |
files | aaccoder.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/aaccoder.c Mon Jul 20 09:24:59 2009 +0000 +++ b/aaccoder.c Mon Jul 20 18:27:17 2009 +0000 @@ -72,8 +72,8 @@ 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];