ra144enc: avoid integer overflows.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/28/head
Michael Niedermayer 12 years ago
parent 5829b7d29e
commit 17b3251c6c
  1. 3
      libavcodec/ra144enc.c

@ -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;

Loading…
Cancel
Save