basesrc: Balance unlock/unlock_stop in _src_stop()

Otherwise it's possible that we won't be able to start again
depending the implementation. We do start/stop in normal use cases
whenever GST_QUERY_SCHEDULING happens before we are started.

https://bugzilla.gnome.org/show_bug.cgi?id=794149
This commit is contained in:
Nicolas Dufresne 2018-03-07 11:19:25 -05:00
parent 12c5d903c9
commit cbd03e26ce

View file

@ -3630,8 +3630,11 @@ gst_base_src_stop (GstBaseSrc * basesrc)
/* flush all */
gst_base_src_set_flushing (basesrc, TRUE);
/* stop the task */
gst_pad_stop_task (basesrc->srcpad);
/* stop flushing, this will balance unlock/unlock_stop calls */
gst_base_src_set_flushing (basesrc, FALSE);
GST_OBJECT_LOCK (basesrc);
if (!GST_BASE_SRC_IS_STARTED (basesrc) && !GST_BASE_SRC_IS_STARTING (basesrc))