Commit 578c7544 authored by Jan Schmidt's avatar Jan Schmidt
Browse files

Only close the device on probe if it succeeded in opening it.

Original commit message from CVS:
Only close the device on probe if it succeeded in opening it.
parent 7b7b337d
2004-03-13 Jan Schmidt <thaytan@mad.scientist.com>
* ext/alsa/gstalsa.c: (gst_alsa_class_probe_devices):
2004-03-13 Ronald Bultje <rbultje@ronald.bitfreak.net> 2004-03-13 Ronald Bultje <rbultje@ronald.bitfreak.net>
* ext/alsa/gstalsamixer.c: (gst_alsa_mixer_free_list): * ext/alsa/gstalsamixer.c: (gst_alsa_mixer_free_list):
......
...@@ -352,7 +352,8 @@ gst_alsa_class_probe_devices (GstAlsaClass *klass, ...@@ -352,7 +352,8 @@ gst_alsa_class_probe_devices (GstAlsaClass *klass,
res == -EBUSY) { res == -EBUSY) {
klass->devices = g_list_append (klass->devices, dev); klass->devices = g_list_append (klass->devices, dev);
snd_pcm_close (pcm); if (res != -EBUSY)
snd_pcm_close (pcm);
} else { } else {
g_free (dev); g_free (dev);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment