summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorThiago Santos <thiagossantos@gmail.com>2017-01-22 11:26:56 -0300
committerThiago Santos <thiagossantos@gmail.com>2017-03-11 11:19:33 -0800
commit045700e80ed3c5bb9c5af04a8dfa9d0210d05fe3 (patch)
treeb6186bdfb518a0a31207b069b8813850c899265e /plugins
parent3c617f1ca13d1386d0cc9709f9db36d5e354b851 (diff)
queue2: avoid return flushing if we have a not-linked
Return the correct flow return instead of returning always flushing. This would cause queue2 to convert not-linked to flushing and making upstream elements stop. https://bugzilla.gnome.org/show_bug.cgi?id=776999
Diffstat (limited to 'plugins')
-rw-r--r--plugins/elements/gstqueue2.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/plugins/elements/gstqueue2.c b/plugins/elements/gstqueue2.c
index 51db8285b..8d9283870 100644
--- a/plugins/elements/gstqueue2.c
+++ b/plugins/elements/gstqueue2.c
@@ -2580,7 +2580,7 @@ gst_queue2_handle_sink_event (GstPad * pad, GstObject * parent,
GST_QUEUE2_MUTEX_UNLOCK (queue);
gst_queue2_post_buffering (queue);
} else {
- /* non-serialized events are passed upstream. */
+ /* non-serialized events are passed downstream. */
ret = gst_pad_push_event (queue->srcpad, event);
}
break;
@@ -2592,10 +2592,12 @@ gst_queue2_handle_sink_event (GstPad * pad, GstObject * parent,
/* ERRORS */
out_flushing:
{
- GST_DEBUG_OBJECT (queue, "refusing event, we are flushing");
+ GstFlowReturn ret = queue->sinkresult;
+ GST_DEBUG_OBJECT (queue, "refusing event, we are %s",
+ gst_flow_get_name (ret));
GST_QUEUE2_MUTEX_UNLOCK (queue);
gst_event_unref (event);
- return GST_FLOW_FLUSHING;
+ return ret;
}
out_eos:
{
@@ -2671,7 +2673,8 @@ gst_queue2_handle_sink_query (GstPad * pad, GstObject * parent,
/* ERRORS */
out_flushing:
{
- GST_DEBUG_OBJECT (queue, "refusing query, we are flushing");
+ GST_DEBUG_OBJECT (queue, "refusing query, we are %s",
+ gst_flow_get_name (queue->sinkresult));
GST_QUEUE2_MUTEX_UNLOCK (queue);
return FALSE;
}
@@ -2994,8 +2997,9 @@ no_item:
}
out_flushing:
{
- 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 we are %s",
+ gst_flow_get_name (queue->srcresult));
+ return queue->srcresult;
}
}
@@ -3424,7 +3428,7 @@ out_flushing:
{
ret = queue->srcresult;
- GST_DEBUG_OBJECT (queue, "we are flushing");
+ GST_DEBUG_OBJECT (queue, "we are %s", gst_flow_get_name (ret));
GST_QUEUE2_MUTEX_UNLOCK (queue);
return ret;
}