mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 10:11:08 +00:00
alsa: report recoverable device failures to base class
This gives custom slave methods in the base class a chance to resynchronize themselves Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org> https://bugzilla.gnome.org/show_bug.cgi?id=708362
This commit is contained in:
parent
c5b75394a9
commit
8f339c0932
1 changed files with 3 additions and 0 deletions
|
@ -994,6 +994,7 @@ xrun_recovery (GstAlsaSink * alsa, snd_pcm_t * handle, gint err)
|
|||
GST_WARNING_OBJECT (alsa,
|
||||
"Can't recover from underrun, prepare failed: %s",
|
||||
snd_strerror (err));
|
||||
gst_audio_base_sink_report_device_failure (GST_AUDIO_BASE_SINK (alsa));
|
||||
return 0;
|
||||
} else if (err == -ESTRPIPE) {
|
||||
while ((err = snd_pcm_resume (handle)) == -EAGAIN)
|
||||
|
@ -1006,6 +1007,8 @@ xrun_recovery (GstAlsaSink * alsa, snd_pcm_t * handle, gint err)
|
|||
"Can't recover from suspend, prepare failed: %s",
|
||||
snd_strerror (err));
|
||||
}
|
||||
if (err == 0)
|
||||
gst_audio_base_sink_report_device_failure (GST_AUDIO_BASE_SINK (alsa));
|
||||
return 0;
|
||||
}
|
||||
return err;
|
||||
|
|
Loading…
Reference in a new issue