mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
gst/gstbus.c: The lock order should be maincontext > OBJECT_LOCK so we need to release the object lock when waking up...
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.
This commit is contained in:
parent
23bdf5c9fe
commit
6766b6a4a2
2 changed files with 15 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
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),
|
||||
|
|
10
gst/gstbus.c
10
gst/gstbus.c
|
@ -298,9 +298,17 @@ gst_bus_get_property (GObject * object, guint prop_id,
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue