Revert "element: Don't hold state lock all the time while sending an event"

This reverts commit b427997119.

It breaks things that used to work before, even if the change by itself is
correct and the previous code is just working around deeper bugs in the async
state change code. Let's go back to what previously worked and then fix async
state changes in general.

https://bugzilla.gnome.org/show_bug.cgi?id=760532
This commit is contained in:
Sebastian Dröge 2016-02-17 16:41:02 +02:00
parent 899060d579
commit a0b3a7f658

View file

@ -1566,6 +1566,7 @@ 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));
@ -1573,6 +1574,7 @@ gst_element_send_event (GstElement * element, GstEvent * event)
} else {
gst_event_unref (event);
}
GST_STATE_UNLOCK (element);
return result;
}