summaryrefslogtreecommitdiff
path: root/sys/shm
diff options
context:
space:
mode:
authorMatt Crane <mattcrane@tycoint.com>2016-01-15 10:49:12 -0500
committerTim-Philipp Müller <tim@centricular.com>2016-01-16 21:46:28 +0000
commiteba01f84e53329dd14508cb72891c7a8e85888e0 (patch)
tree785620215c62f0555a8b05a6c6ff3d6c41a4dc99 /sys/shm
parent3184175dae0adfe3a59c38b2fbb8fba5b2a1b27c (diff)
downloadgstreamer-plugins-bad-eba01f84e53329dd14508cb72891c7a8e85888e0.tar.gz
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
Diffstat (limited to 'sys/shm')
-rw-r--r--sys/shm/gstshmsink.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/shm/gstshmsink.c b/sys/shm/gstshmsink.c
index 784acca24..13d67bd13 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;
}
}