ext/alsa/gstalsasink.c: Also release lock when we get an error in _reset(); fix an error message.

Original commit message from CVS:
* ext/alsa/gstalsasink.c: (gst_alsasink_open),
(gst_alsasink_reset):
Also release lock when we get an error in _reset();
fix an error message.
This commit is contained in:
Wim Taymans 2006-02-17 09:24:56 +00:00
parent 943dfba995
commit fd0f54c59f
2 changed files with 10 additions and 1 deletions

View file

@ -1,3 +1,10 @@
2006-02-17 Wim Taymans <wim@fluendo.com>
* ext/alsa/gstalsasink.c: (gst_alsasink_open),
(gst_alsasink_reset):
Also release lock when we get an error in _reset();
fix an error message.
2006-02-16 Tim-Philipp Müller <tim at centricular dot net> 2006-02-16 Tim-Philipp Müller <tim at centricular dot net>
* ext/alsa/gstalsasink.c: (gst_alsasink_class_init), * ext/alsa/gstalsasink.c: (gst_alsasink_class_init),

View file

@ -713,7 +713,7 @@ gst_alsasink_open (GstAudioSink * asink)
open_error: open_error:
{ {
if (err == -EBUSY) { if (err == -EBUSY) {
GST_ELEMENT_ERROR (alsa, RESOURCE, BUSY, (NULL), (NULL)); GST_ELEMENT_ERROR (alsa, RESOURCE, BUSY, (NULL), ("Device is busy"));
} else { } else {
GST_ELEMENT_ERROR (alsa, RESOURCE, OPEN_WRITE, GST_ELEMENT_ERROR (alsa, RESOURCE, OPEN_WRITE,
(NULL), ("Playback open error: %s", snd_strerror (err))); (NULL), ("Playback open error: %s", snd_strerror (err)));
@ -941,12 +941,14 @@ drop_error:
{ {
GST_ELEMENT_ERROR (alsa, RESOURCE, SETTINGS, GST_ELEMENT_ERROR (alsa, RESOURCE, SETTINGS,
("alsa-reset: pcm drop error: %s", snd_strerror (err)), (NULL)); ("alsa-reset: pcm drop error: %s", snd_strerror (err)), (NULL));
GST_ALSA_UNLOCK (asink);
return; return;
} }
prepare_error: prepare_error:
{ {
GST_ELEMENT_ERROR (alsa, RESOURCE, SETTINGS, GST_ELEMENT_ERROR (alsa, RESOURCE, SETTINGS,
("alsa-reset: pcm prepare error: %s", snd_strerror (err)), (NULL)); ("alsa-reset: pcm prepare error: %s", snd_strerror (err)), (NULL));
GST_ALSA_UNLOCK (asink);
return; return;
} }
} }