summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Stembridge <jstembridge@users.sourceforge.net>2003-04-23 10:39:33 +0000
committerJames Stembridge <jstembridge@users.sourceforge.net>2003-04-23 10:39:33 +0000
commite8867b2fabbc6197e761fba17056e4a5472f0436 (patch)
tree11b1878a3bd1bbf5c06732523e4f0fbc6817a196
parent2d73581e8943b4d62edcc1ec5cac9fc9c2519d51 (diff)
downloadxine-lib-e8867b2fabbc6197e761fba17056e4a5472f0436.tar.gz
xine-lib-e8867b2fabbc6197e761fba17056e4a5472f0436.tar.bz2
check type of mixer element before trying to use it
CVS patchset: 4655 CVS date: 2003/04/23 10:39:33
-rw-r--r--src/audio_out/audio_alsa_out.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/audio_out/audio_alsa_out.c b/src/audio_out/audio_alsa_out.c
index 18e97e51e..c654d942a 100644
--- a/src/audio_out/audio_alsa_out.c
+++ b/src/audio_out/audio_alsa_out.c
@@ -26,7 +26,7 @@
* (c) 2001 James Courtier-Dutton <James@superbug.demon.co.uk>
*
*
- * $Id: audio_alsa_out.c,v 1.91 2003/04/17 17:04:12 siggi Exp $
+ * $Id: audio_alsa_out.c,v 1.92 2003/04/23 10:39:33 jstembridge Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -885,7 +885,8 @@ static void ao_alsa_mixer_init(ao_driver_t *this_gen) {
for (elem = snd_mixer_first_elem(this->mixer.handle); elem; elem = snd_mixer_elem_next(elem)) {
sid = (snd_mixer_selem_id_t *)(((char *)mixer_sid) + snd_mixer_selem_id_sizeof() * mixer_n_selems);
- if (!snd_mixer_selem_is_active(elem))
+ if ((snd_mixer_elem_get_type(elem) != SND_MIXER_ELEM_SIMPLE) ||
+ !snd_mixer_selem_is_active(elem))
continue;
snd_mixer_selem_get_id(elem, sid);