Original commit message from CVS:
* gst/gstbus.c: (gst_bus_wakeup_main_context):
The lock order should be maincontext > OBJECT_LOCK so we need to release
the object lock when waking up the mainloop to avoid deadlocks.
+2009-01-05 Wim Taymans <wim.taymans@collabora.co.uk>
+
+ * gst/gstbus.c: (gst_bus_wakeup_main_context):
+ The lock order should be maincontext > OBJECT_LOCK so we need to release
+ the object lock when waking up the mainloop to avoid deadlocks.
+
2009-01-05 Wim Taymans <wim.taymans@collabora.co.uk>
* gst/gstbin.c: (gst_bin_set_index_func), (gst_bin_set_clock_func),
static void
gst_bus_wakeup_main_context (GstBus * bus)
{
+ GMainContext *ctx;
+
GST_OBJECT_LOCK (bus);
- g_main_context_wakeup (bus->priv->main_context);
+ if ((ctx = bus->priv->main_context))
+ g_main_context_ref (ctx);
GST_OBJECT_UNLOCK (bus);
+
+ g_main_context_wakeup (ctx);
+
+ if (ctx)
+ g_main_context_unref (ctx);
}
static void