basesink: Take PREROLL_LOCK in wait_event()

It is calling do_sync(), which requires the STREAM_LOCK and PREROLL_LOCK to be
taken. The STREAM_LOCK is already taken in all callers, the PREROLL_LOCK not.

https://bugzilla.gnome.org/show_bug.cgi?id=764939
This commit is contained in:
Sebastian Dröge 2016-04-12 15:11:30 +03:00
parent 7d0abcc032
commit 828a4627db

View file

@ -3038,10 +3038,12 @@ gst_base_sink_wait_event (GstBaseSink * basesink, GstEvent * event)
bclass = GST_BASE_SINK_GET_CLASS (basesink);
GST_BASE_SINK_PREROLL_LOCK (basesink);
if (G_LIKELY (bclass->wait_event))
ret = bclass->wait_event (basesink, event);
else
ret = GST_FLOW_NOT_SUPPORTED;
GST_BASE_SINK_PREROLL_UNLOCK (basesink);
return ret;
}