[MPlayer-cvslog] r37330 - trunk/libaf/af_hrtf.c
reimar
subversion at mplayerhq.hu
Sat Dec 6 12:16:13 CET 2014
Author: reimar
Date: Sat Dec 6 12:16:12 2014
New Revision: 37330
Log:
af_hrtf: Fix out-of-range read.
Based on patch by Yuriy Kaminskiy [yumkam gmail].
Modified:
trunk/libaf/af_hrtf.c
Modified: trunk/libaf/af_hrtf.c
==============================================================================
--- trunk/libaf/af_hrtf.c Sat Nov 29 14:08:25 2014 (r37329)
+++ trunk/libaf/af_hrtf.c Sat Dec 6 12:16:12 2014 (r37330)
@@ -278,8 +278,13 @@ static inline void update_ch(af_hrtf_t *
}
/* 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];
+ }
}
/* Initialization and runtime control */
More information about the MPlayer-cvslog
mailing list