ext/alsa/gstalsasink.c: check for ALSA errors properly, instead of relying on ALSA's error strings to serve to the user.

Original commit message from CVS:
* ext/alsa/gstalsasink.c: (gst_alsasink_open):
check for ALSA errors properly, instead of relying on ALSA's
error strings to serve to the user.
This commit is contained in:
Thomas Vander Stichele 2005-11-10 18:47:20 +00:00
parent 4f9f097798
commit 1f1bfe8a09
2 changed files with 12 additions and 2 deletions

View file

@ -1,3 +1,9 @@
2005-11-10 Thomas Vander Stichele <thomas at apestaart dot org>
* ext/alsa/gstalsasink.c: (gst_alsasink_open):
check for ALSA errors properly, instead of relying on ALSA's
error strings to serve to the user.
2005-11-10 Wim Taymans <wim@fluendo.com>
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_event), (gst_ogg_demux_init),

View file

@ -516,8 +516,12 @@ gst_alsasink_open (GstAudioSink * asink)
/* ERRORS */
open_error:
{
GST_ELEMENT_ERROR (alsa, RESOURCE, OPEN_READ,
("Playback open error: %s", snd_strerror (err)), (NULL));
if (err == -EBUSY) {
GST_ELEMENT_ERROR (alsa, RESOURCE, BUSY, (NULL), (NULL));
} else {
GST_ELEMENT_ERROR (alsa, RESOURCE, OPEN_WRITE,
(NULL), ("Playback open error: %s", snd_strerror (err)));
}
return FALSE;
}
}