alsasrc: set alsasrc->handle back to NULL when closing device

Fixes crashes in gst_alsa_find_device_name() when probing or
reading the device-name property (e.g. when doing a dot-file
dump). Fixes #589797.
This commit is contained in:
Balachandran C 2009-07-27 10:29:27 +01:00 committed by Tim-Philipp Müller
parent 789f5b0488
commit 01e0fdd86c

View file

@ -741,6 +741,7 @@ gst_alsasrc_close (GstAudioSrc * asrc)
GstAlsaSrc *alsa = GST_ALSA_SRC (asrc);
snd_pcm_close (alsa->handle);
alsa->handle = NULL;
if (alsa->mixer) {
gst_alsa_mixer_free (alsa->mixer);