funnel: Make sure to only lock the stream lock once

We also only unlock it once, and otherwise have it locked forever from
this thread, causing deadlocks on shutdown later.
This commit is contained in:
Sebastian Dröge 2016-11-09 11:37:09 +02:00
parent 5571ad1260
commit abe60a92c4

View file

@ -403,8 +403,10 @@ gst_funnel_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
/* If no data is coming and we receive serialized event, need to forward all sticky events.
* Otherwise downstream has an inconsistent set of sticky events when
* handling the new event. */
unlock = TRUE;
GST_PAD_STREAM_LOCK (funnel->srcpad);
if (!unlock) {
unlock = TRUE;
GST_PAD_STREAM_LOCK (funnel->srcpad);
}
if ((funnel->last_sinkpad == NULL) || (funnel->forward_sticky_events
&& (funnel->last_sinkpad != pad))) {