mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 00:01:23 +00:00
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
This commit is contained in:
parent
a7f8ad9c9a
commit
b427997119
1 changed files with 0 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue