mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
pulsesink: Fail gracefully if no threaded PA mainloop can be created
Fixes bug #628020.
This commit is contained in:
parent
77c7f5fdcd
commit
37ee281d13
1 changed files with 5 additions and 1 deletions
|
@ -2606,7 +2606,11 @@ gst_pulsesink_change_state (GstElement * element, GstStateChange transition)
|
|||
case GST_STATE_CHANGE_NULL_TO_READY:
|
||||
g_assert (pulsesink->mainloop == NULL);
|
||||
pulsesink->mainloop = pa_threaded_mainloop_new ();
|
||||
g_assert (pulsesink->mainloop != NULL);
|
||||
if (!pulsesink->mainloop) {
|
||||
GST_ELEMENT_ERROR (pulsesink, RESOURCE, FAILED,
|
||||
("pa_threaded_mainloop_new() failed"), (NULL));
|
||||
return GST_STATE_CHANGE_FAILURE;
|
||||
}
|
||||
res = pa_threaded_mainloop_start (pulsesink->mainloop);
|
||||
g_assert (res == 0);
|
||||
|
||||
|
|
Loading…
Reference in a new issue