summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2015-12-10 11:35:05 +0200
committerSebastian Dröge <sebastian@centricular.com>2015-12-10 11:35:05 +0200
commitb427997119a2b6aacbeb550f729936f8b963e24b (patch)
treec05de649354bc07e983eaee053c86fcab741a4ca
parenta7f8ad9c9a1a8842b55db4aec639a5f579cab345 (diff)
element: Don't hold state lock all the time while sending an event
This lock seems to exist only to prevent elements from changing states while events are being processed. However events are going to be processed nonetheless in those elements if sent directly via pads, so protection must already be implemented inside the elements for event handling if it is needed. As such having the lock here is not very useful and is actually causing various deadlocks in different situations as described in https://bugzilla.gnome.org/show_bug.cgi?id=744040
-rw-r--r--gst/gstelement.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/gst/gstelement.c b/gst/gstelement.c
index 3828277ef..832ac27a1 100644
--- a/gst/gstelement.c
+++ b/gst/gstelement.c
@@ -1566,13 +1566,11 @@ gst_element_send_event (GstElement * element, GstEvent * event)
oclass = GST_ELEMENT_GET_CLASS (element);
- GST_STATE_LOCK (element);
if (oclass->send_event) {
GST_CAT_DEBUG (GST_CAT_ELEMENT_PADS, "send %s event on element %s",
GST_EVENT_TYPE_NAME (event), GST_ELEMENT_NAME (element));
result = oclass->send_event (element, event);
}
- GST_STATE_UNLOCK (element);
return result;
}