queue2: Signal the sinkpad thread if a flow error happened

It might still be waiting for a query to be handled, or the queue to become
empty again for the next item. Also if downstream returns FLUSHING, flush the
queue like we do in queue and multiqueue.
This commit is contained in:
Sebastian Dröge 2015-03-03 12:53:13 +01:00
parent a941b4651c
commit bc77a3fa0a

View file

@ -2812,6 +2812,13 @@ out_flushing:
GstFlowReturn ret = queue->srcresult;
gst_pad_pause_task (queue->srcpad);
if (ret == GST_FLOW_FLUSHING) {
gst_queue2_locked_flush (queue, FALSE, FALSE);
} else {
GST_QUEUE2_SIGNAL_DEL (queue);
queue->last_query = FALSE;
g_cond_signal (&queue->query_handled);
}
GST_QUEUE2_MUTEX_UNLOCK (queue);
GST_CAT_LOG_OBJECT (queue_dataflow, queue,
"pause task, reason: %s", gst_flow_get_name (queue->srcresult));