From: Thiago Santos Date: Wed, 15 Mar 2017 05:18:36 +0000 (-0700) Subject: queue: avoid return flushing if we have a not-linked X-Git-Tag: 1.12.0~61 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=058bdcfe6b6ae4c1ceb8c31560d2a9bffe075e1d;p=platform%2Fupstream%2Fgstreamer.git 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 --- 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; } }