From: Nicolas Dufresne Date: Wed, 7 Mar 2018 16:19:25 +0000 (-0500) Subject: basesrc: Balance unlock/unlock_stop in _src_stop() X-Git-Tag: 1.16.2~452 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cbd03e26ce8ac41c77b3b4a9b7f06a54a0311ce8;p=platform%2Fupstream%2Fgstreamer.git 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 --- diff --git a/libs/gst/base/gstbasesrc.c b/libs/gst/base/gstbasesrc.c index f85f321..fd046bf 100644 --- a/libs/gst/base/gstbasesrc.c +++ b/libs/gst/base/gstbasesrc.c @@ -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))