Commit 74e9640a authored by Vincent Penquerc'h's avatar Vincent Penquerc'h

alsasink: pass correct error to g_strerror

The error we get is a negated errno.

While there, fix a couple typos in messages.
parent 86c698a4
......@@ -969,13 +969,13 @@ gst_alsasink_close (GstAudioSink * asink)
static gint
xrun_recovery (GstAlsaSink * alsa, snd_pcm_t * handle, gint err)
{
GST_DEBUG_OBJECT (alsa, "xrun recovery %d: %s", err, g_strerror (err));
GST_DEBUG_OBJECT (alsa, "xrun recovery %d: %s", err, g_strerror (-err));
if (err == -EPIPE) { /* under-run */
err = snd_pcm_prepare (handle);
if (err < 0)
GST_WARNING_OBJECT (alsa,
"Can't recovery from underrun, prepare failed: %s",
"Can't recover from underrun, prepare failed: %s",
snd_strerror (err));
return 0;
} else if (err == -ESTRPIPE) {
......@@ -986,7 +986,7 @@ xrun_recovery (GstAlsaSink * alsa, snd_pcm_t * handle, gint err)
err = snd_pcm_prepare (handle);
if (err < 0)
GST_WARNING_OBJECT (alsa,
"Can't recovery from suspend, prepare failed: %s",
"Can't recover from suspend, prepare failed: %s",
snd_strerror (err));
}
return 0;
......
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