From 3de7d40dd5e34d9b85e3dbbfc47a1f1874e0b22a Mon Sep 17 00:00:00 2001 From: Matt Crane Date: Fri, 15 Jan 2016 10:49:12 -0500 Subject: shmsink: fix possible deadlock in _render()/ _allocator_free() Drop object lock before unrefing memory, otherwise the object lock might be taken again from the allocator and then things deadlock. https://bugzilla.gnome.org/show_bug.cgi?id=760551 --- sys/shm/gstshmsink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/shm/gstshmsink.c b/sys/shm/gstshmsink.c index bb700ca51..5a7041710 100644 --- a/sys/shm/gstshmsink.c +++ b/sys/shm/gstshmsink.c @@ -715,8 +715,8 @@ gst_shm_sink_render (GstBaseSink * bsink, GstBuffer * buf) while (self->wait_for_connection && !self->clients) { g_cond_wait (&self->cond, GST_OBJECT_GET_LOCK (self)); if (self->unlock) { - gst_memory_unref (memory); GST_OBJECT_UNLOCK (self); + gst_memory_unref (memory); return GST_FLOW_FLUSHING; } } -- cgit v1.2.1