mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 04:31:06 +00:00
queue: Flush the internal queue when we see GST_FLOW_FLUSHING
Ensures that we don't end up with stale contents (like GstQuery) in the internal GQueue after any blocking upstream thread returns.
This commit is contained in:
parent
c36748177f
commit
2bdd71a710
1 changed files with 4 additions and 1 deletions
|
@ -1163,7 +1163,10 @@ out_flushing:
|
||||||
gst_pad_pause_task (queue->srcpad);
|
gst_pad_pause_task (queue->srcpad);
|
||||||
GST_CAT_LOG_OBJECT (queue_dataflow, queue,
|
GST_CAT_LOG_OBJECT (queue_dataflow, queue,
|
||||||
"pause task, reason: %s", gst_flow_get_name (ret));
|
"pause task, reason: %s", gst_flow_get_name (ret));
|
||||||
GST_QUEUE_SIGNAL_DEL (queue);
|
if (ret == GST_FLOW_FLUSHING)
|
||||||
|
gst_queue_locked_flush (queue);
|
||||||
|
else
|
||||||
|
GST_QUEUE_SIGNAL_DEL (queue);
|
||||||
GST_QUEUE_MUTEX_UNLOCK (queue);
|
GST_QUEUE_MUTEX_UNLOCK (queue);
|
||||||
/* let app know about us giving up if upstream is not expected to do so */
|
/* let app know about us giving up if upstream is not expected to do so */
|
||||||
/* EOS is already taken care of elsewhere */
|
/* EOS is already taken care of elsewhere */
|
||||||
|
|
Loading…
Reference in a new issue