[FFmpeg-cvslog] r17677 - trunk/libavcodec/ra144.c
vitor
subversion
Sun Mar 1 12:14:21 CET 2009
Author: vitor
Date: Sun Mar 1 12:14:21 2009
New Revision: 17677
Log:
Do not read uninitialized buffer, no matter if it will be multiplied by
zero later. This should fix some valgrind warnings and hopefully FATE
ra144 test on ARM.
Modified:
trunk/libavcodec/ra144.c
Modified: trunk/libavcodec/ra144.c
==============================================================================
--- trunk/libavcodec/ra144.c Sun Mar 1 10:14:20 2009 (r17676)
+++ trunk/libavcodec/ra144.c Sun Mar 1 12:14:21 2009 (r17677)
@@ -138,8 +138,13 @@ static void add_wav(int16_t *dest, int n
for (i=!skip_first; i<3; i++)
v[i] = (gain_val_tab[n][i] * m[i]) >> gain_exp_tab[n];
+ if (v[0]) {
for (i=0; i < BLOCKSIZE; i++)
dest[i] = (s1[i]*v[0] + s2[i]*v[1] + s3[i]*v[2]) >> 12;
+ } else {
+ for (i=0; i < BLOCKSIZE; i++)
+ dest[i] = (s2[i]*v[1] + s3[i]*v[2]) >> 12;
+ }
}
static unsigned int rescale_rms(unsigned int rms, unsigned int energy)
More information about the ffmpeg-cvslog
mailing list