diff options
author | Matt Crane <mattcrane@tycoint.com> | 2016-01-15 10:49:12 -0500 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2016-01-16 22:08:01 +0000 |
commit | 3de7d40dd5e34d9b85e3dbbfc47a1f1874e0b22a (patch) | |
tree | 6d125e7a93626cfc1b99c66829563e48b8c753a2 | |
parent | f719b30815de4239bf58b5ad77a613b4ea1c791d (diff) | |
download | gstreamer-plugins-bad-3de7d40dd5e34d9b85e3dbbfc47a1f1874e0b22a.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
-rw-r--r-- | sys/shm/gstshmsink.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; } } |