diff options
author | James Courtier-Dutton <jcdutton@users.sourceforge.net> | 2003-10-07 17:25:10 +0000 |
---|---|---|
committer | James Courtier-Dutton <jcdutton@users.sourceforge.net> | 2003-10-07 17:25:10 +0000 |
commit | e41c538cc179f4ff9d6f68d424ffaad568e7a727 (patch) | |
tree | e819b7814e1ae034aeeeaadb4e7ca8e952bde1cf | |
parent | 8c9324a842f7fdf334b932e844cd282c7d0c5923 (diff) | |
download | xine-lib-e41c538cc179f4ff9d6f68d424ffaad568e7a727.tar.gz xine-lib-e41c538cc179f4ff9d6f68d424ffaad568e7a727.tar.bz2 |
Fix some bugs in the sound state when using alsa for audio out.
CVS patchset: 5463
CVS date: 2003/10/07 17:25:10
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | src/audio_out/audio_alsa_out.c | 9 |
2 files changed, 7 insertions, 3 deletions
@@ -1,5 +1,6 @@ xine-lib (1-rc2) * XvMC support for hardware accelerated mpeg2 playback (-V xvmc) + * Fix some errors in sound state when exiting xine and using alsa. xine-lib (1-rc1) * fix incorrect colours when blending frame with a big-endian RGB pixel format diff --git a/src/audio_out/audio_alsa_out.c b/src/audio_out/audio_alsa_out.c index 5ae678586..4d563cce6 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.113 2003/10/06 15:27:10 mroi Exp $ + * $Id: audio_alsa_out.c,v 1.114 2003/10/07 17:25:10 jcdutton Exp $ */ #ifdef HAVE_CONFIG_H @@ -999,6 +999,7 @@ static void ao_alsa_mixer_init(ao_driver_t *this_gen) { int found; int sw; + this->mixer.elem = 0; snd_ctl_card_info_alloca(&hw_info); pcm_device = config->register_string(config, "audio.alsa_default_device", @@ -1067,10 +1068,10 @@ static void ao_alsa_mixer_init(ao_driver_t *this_gen) { snd_mixer_selem_get_id(elem, sid); mixer_n_selems++; - + if(!strcmp((snd_mixer_selem_get_name(elem)), this->mixer.name)) { - // printf("found %s\n", snd_mixer_selem_get_name(elem)); + /* printf("found %s\n", snd_mixer_selem_get_name(elem)); */ this->mixer.elem = elem; @@ -1200,6 +1201,8 @@ static ao_driver_t *open_plugin (audio_driver_class_t *class_gen, const void *da snd_pcm_hw_params_t *params; this = (alsa_driver_t *) malloc (sizeof (alsa_driver_t)); + memset( this, 0, sizeof( alsa_driver_t ) ); /* Set all those pointers to 0 (NULL) */ + this->class = class; err = snd_lib_error_set_handler(error_callback); |