Commit 608bd3e2 authored by Thibault Saunier's avatar Thibault Saunier
Browse files

videomixer: Do not take COLLECT_PADS_STREAM_LOCK when unnecessary

Collectpad takes the lock itself when receiving serialized events
and we should not take it for not serialized ones
parent 1b5a8ac4
......@@ -1717,14 +1717,11 @@ gst_videomixer2_sink_event (GstCollectPads * pads, GstCollectData * cdata,
break;
}
case GST_EVENT_FLUSH_START:
GST_COLLECT_PADS_STREAM_LOCK (mix->collect);
mix->flush_stop_pending = TRUE;
GST_COLLECT_PADS_STREAM_UNLOCK (mix->collect);
ret = gst_collect_pads_event_default (pads, cdata, event, discard);
event = NULL;
break;
case GST_EVENT_FLUSH_STOP:
GST_COLLECT_PADS_STREAM_LOCK (mix->collect);
mix->newseg_pending = TRUE;
if (mix->flush_stop_pending) {
GST_DEBUG_OBJECT (pad, "forwarding flush stop");
......@@ -1735,7 +1732,6 @@ gst_videomixer2_sink_event (GstCollectPads * pads, GstCollectData * cdata,
discard = TRUE;
GST_DEBUG_OBJECT (pad, "eating flush stop");
}
GST_COLLECT_PADS_STREAM_UNLOCK (mix->collect);
/* FIXME Should we reset in case we were not awaiting a flush stop? */
gst_videomixer2_reset_qos (mix);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment