[pulseaudio-discuss] [PATCH] alsa-mixer: Fix element channel masks array size.
Tanu Kaskinen
tanu.kaskinen at digia.com
Mon Mar 26 04:35:30 PDT 2012
Valid channel id range is from 0 to SND_MIXER_SCHN_LAST,
inclusive, so the array size has to be
SND_MIXER_SCHN_LAST + 1.
---
src/modules/alsa/alsa-mixer.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/modules/alsa/alsa-mixer.h b/src/modules/alsa/alsa-mixer.h
index cc2dfc3..ee7221c 100644
--- a/src/modules/alsa/alsa-mixer.h
+++ b/src/modules/alsa/alsa-mixer.h
@@ -145,7 +145,7 @@ struct pa_alsa_element {
long volume_limit; /* -1 for no configured limit */
double min_dB, max_dB;
- pa_channel_position_mask_t masks[SND_MIXER_SCHN_LAST][2];
+ pa_channel_position_mask_t masks[SND_MIXER_SCHN_LAST + 1][2];
unsigned n_channels;
pa_channel_position_mask_t merged_mask;
--
1.7.8
More information about the pulseaudio-discuss
mailing list