mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 15:51:11 +00:00
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
This commit is contained in:
parent
3c617f1ca1
commit
045700e80e
1 changed files with 11 additions and 7 deletions
|
@ -2580,7 +2580,7 @@ gst_queue2_handle_sink_event (GstPad * pad, GstObject * parent,
|
||||||
GST_QUEUE2_MUTEX_UNLOCK (queue);
|
GST_QUEUE2_MUTEX_UNLOCK (queue);
|
||||||
gst_queue2_post_buffering (queue);
|
gst_queue2_post_buffering (queue);
|
||||||
} else {
|
} else {
|
||||||
/* non-serialized events are passed upstream. */
|
/* non-serialized events are passed downstream. */
|
||||||
ret = gst_pad_push_event (queue->srcpad, event);
|
ret = gst_pad_push_event (queue->srcpad, event);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -2592,10 +2592,12 @@ gst_queue2_handle_sink_event (GstPad * pad, GstObject * parent,
|
||||||
/* ERRORS */
|
/* ERRORS */
|
||||||
out_flushing:
|
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_QUEUE2_MUTEX_UNLOCK (queue);
|
||||||
gst_event_unref (event);
|
gst_event_unref (event);
|
||||||
return GST_FLOW_FLUSHING;
|
return ret;
|
||||||
}
|
}
|
||||||
out_eos:
|
out_eos:
|
||||||
{
|
{
|
||||||
|
@ -2671,7 +2673,8 @@ gst_queue2_handle_sink_query (GstPad * pad, GstObject * parent,
|
||||||
/* ERRORS */
|
/* ERRORS */
|
||||||
out_flushing:
|
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);
|
GST_QUEUE2_MUTEX_UNLOCK (queue);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -2994,8 +2997,9 @@ no_item:
|
||||||
}
|
}
|
||||||
out_flushing:
|
out_flushing:
|
||||||
{
|
{
|
||||||
GST_CAT_LOG_OBJECT (queue_dataflow, queue, "exit because we are flushing");
|
GST_CAT_LOG_OBJECT (queue_dataflow, queue, "exit because we are %s",
|
||||||
return GST_FLOW_FLUSHING;
|
gst_flow_get_name (queue->srcresult));
|
||||||
|
return queue->srcresult;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3424,7 +3428,7 @@ out_flushing:
|
||||||
{
|
{
|
||||||
ret = queue->srcresult;
|
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);
|
GST_QUEUE2_MUTEX_UNLOCK (queue);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue