summaryrefslogtreecommitdiff
path: root/ext/pulse/pulsesink.c
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@collabora.co.uk>2009-07-20 19:04:09 +0200
committerWim Taymans <wim.taymans@collabora.co.uk>2009-07-20 19:07:19 +0200
commit8bfd80e5a2bef03ec333884eb999fbd492cd659e (patch)
treeca72d7d368177252e767cbf1a32cb077fcda3226 /ext/pulse/pulsesink.c
parente914f5254abe4dc833cdbb9f169221dfbf2ee644 (diff)
pulsesink: don't wait for posted message
We can't wait for the ENTER/LEAVE messages to be be posted because the base class sometimes calls the start method with the object lock, which would block the message posting. Instead, just assume that the message will be posted soon and continue. We'll have to fix this in the base class.
Diffstat (limited to 'ext/pulse/pulsesink.c')
-rw-r--r--ext/pulse/pulsesink.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/ext/pulse/pulsesink.c b/ext/pulse/pulsesink.c
index 88efa34f7..5373cdd37 100644
--- a/ext/pulse/pulsesink.c
+++ b/ext/pulse/pulsesink.c
@@ -859,6 +859,7 @@ mainloop_enter_defer_cb (pa_mainloop_api * api, void *userdata)
message = gst_message_new_stream_status (GST_OBJECT (pulsesink),
GST_STREAM_STATUS_TYPE_ENTER, GST_ELEMENT (pulsesink));
gst_message_set_stream_status_object (message, &val);
+
gst_element_post_message (GST_ELEMENT (pulsesink), message);
/* signal the waiter */
@@ -883,9 +884,6 @@ gst_pulseringbuffer_start (GstRingBuffer * buf)
pa_mainloop_api_once (pa_threaded_mainloop_get_api (psink->mainloop),
mainloop_enter_defer_cb, psink);
- while (psink->pa_defer_ran == FALSE)
- pa_threaded_mainloop_wait (psink->mainloop);
-
GST_DEBUG_OBJECT (psink, "starting");
pbuf->paused = FALSE;
gst_pulsering_set_corked (pbuf, FALSE, FALSE);
@@ -988,9 +986,6 @@ cleanup:
mainloop_leave_defer_cb, psink);
GST_DEBUG_OBJECT (psink, "waiting for stream status");
- while (psink->pa_defer_ran == FALSE)
- pa_threaded_mainloop_wait (psink->mainloop);
-
pa_threaded_mainloop_unlock (psink->mainloop);
return res;