From 058bdcfe6b6ae4c1ceb8c31560d2a9bffe075e1d Mon Sep 17 00:00:00 2001 From: Thiago Santos Date: Tue, 14 Mar 2017 22:18:36 -0700 Subject: [PATCH] queue: avoid return flushing if we have a not-linked Return the correct flow return instead of returning always flushing. This would cause queue to convert not-linked to flushing and making upstream elements stop. Based on the previous patch for queue2. https://bugzilla.gnome.org/show_bug.cgi?id=776999 --- plugins/elements/gstqueue.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/plugins/elements/gstqueue.c b/plugins/elements/gstqueue.c index e98c1f6..db02e20 100644 --- a/plugins/elements/gstqueue.c +++ b/plugins/elements/gstqueue.c @@ -1465,15 +1465,19 @@ no_item: } out_flushing: { - GST_CAT_LOG_OBJECT (queue_dataflow, queue, "exit because we are flushing"); - return GST_FLOW_FLUSHING; + GstFlowReturn ret = queue->srcresult; + GST_CAT_LOG_OBJECT (queue_dataflow, queue, + "exit because task paused, reason: %s", gst_flow_get_name (ret)); + return ret; } out_flushing_query: { + GstFlowReturn ret = queue->srcresult; queue->last_query = FALSE; g_cond_signal (&queue->query_handled); - GST_CAT_LOG_OBJECT (queue_dataflow, queue, "exit because we are flushing"); - return GST_FLOW_FLUSHING; + GST_CAT_LOG_OBJECT (queue_dataflow, queue, + "exit because task paused, reason: %s", gst_flow_get_name (ret)); + return ret; } } -- 2.7.4