af_hrtf: Fix out-of-range read.

Based on patch by Yuriy Kaminskiy [yumkam gmail].

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@37330 b3059339-0415-0410-9bf9-f77b7e298cf2
Signed-off-by: wm4 <wm4@nowhere>
This commit is contained in:
reimar 2014-12-06 11:16:12 +00:00 committed by Alessandro Ghedini
parent 7c53bb4bb1
commit 4de6f4f616
1 changed files with 7 additions and 2 deletions

View File

@ -280,8 +280,13 @@ static inline void update_ch(af_hrtf_t *s, short *in, const int k)
}
/* We need to update the bass compensation delay line, too. */
s->ba_l[k] = in[0] + in[4] + in[2];
s->ba_r[k] = in[4] + in[1] + in[3];
// TODO: should this use lf/cf/rf etc. instead?
s->ba_l[k] = in[0];
s->ba_r[k] = in[1];
if (s->decode_mode == HRTF_MIX_51) {
s->ba_l[k] += in[4] + in[2];
s->ba_r[k] += in[4] + in[3];
}
}
static void clear_coeff(af_hrtf_t *s, float *c)