ra144enc: avoid integer overflows.

The values are all positive but signed variables where used,
which overflowed.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-09-10 20:54:03 +02:00
parent 5829b7d29e
commit 17b3251c6c

View File

@ -347,7 +347,8 @@ static void ra144_encode_subblock(RA144Context *ractx,
float zero[BLOCKSIZE], cba[BLOCKSIZE], cb1[BLOCKSIZE], cb2[BLOCKSIZE];
int16_t cba_vect[BLOCKSIZE];
int cba_idx, cb1_idx, cb2_idx, gain;
int i, n, m[3];
int i, n;
unsigned m[3];
float g[3];
float error, best_error;