mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-08 13:22:53 +02:00
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. Originally committed as revision 17677 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
d819b41ba1
commit
9e27e0d4f8
@ -138,8 +138,13 @@ static void add_wav(int16_t *dest, int n, int skip_first, int *m,
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user