Commit 7cf9967e authored by Stefan Kost's avatar Stefan Kost Committed by Wim Taymans
Browse files

pulsesink: fix racy shutdown

Keep a ref of pulsesink for deferred mainloop invocation. Fixes #614765
parent f5dba3a7
......@@ -1025,6 +1025,7 @@ mainloop_leave_defer_cb (pa_mainloop_api * api, void *userdata)
pulsesink->pa_defer_ran = TRUE;
pa_threaded_mainloop_signal (pulsesink->mainloop, 0);
gst_object_unref (pulsesink);
}
/* stop playback, we flush everything. */
......@@ -1071,6 +1072,7 @@ cleanup:
GST_DEBUG_OBJECT (psink, "scheduling stream status");
psink->pa_defer_ran = FALSE;
gst_object_ref (psink);
pa_mainloop_api_once (pa_threaded_mainloop_get_api (psink->mainloop),
mainloop_leave_defer_cb, psink);
......
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