diff options
author | Vitor Sessak <vitor1001@gmail.com> | 2008-09-06 11:46:29 +0000 |
---|---|---|
committer | Vitor Sessak <vitor1001@gmail.com> | 2008-09-06 11:46:29 +0000 |
commit | 4fdb41a84bc4cbc50600f1ba5ab6af64c69ca092 (patch) | |
tree | 0efc931dbef23e2915b0426e86a110453fdebb83 /libavcodec/ra144.c | |
parent | a90fbeec2ab30230838947a6210357b005bd1b53 (diff) | |
download | ffmpeg-4fdb41a84bc4cbc50600f1ba5ab6af64c69ca092.tar.gz |
Test a var for overflow just after it is set
Originally committed as revision 15223 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/ra144.c')
-rw-r--r-- | libavcodec/ra144.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/ra144.c b/libavcodec/ra144.c index 6192cde57d..2918902c9f 100644 --- a/libavcodec/ra144.c +++ b/libavcodec/ra144.c @@ -251,11 +251,11 @@ static int eval_refl(int *refl, const int16_t *coefs, RA144Context *ractx) for (j=0; j <= i; j++) bp1[j] = ((bp2[j] - ((refl[i+1] * bp2[i-j]) >> 12)) * (0x1000000 / b)) >> 12; - refl[i] = bp1[i]; - if ((unsigned) bp1[i] + 0x1000 > 0x1fff) return 1; + refl[i] = bp1[i]; + FFSWAP(int *, bp1, bp2); } return 0; |