mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-26 07:56:38 +00:00
multiqueue: Don't stop threads on UNEXPECTED and forward flow returns.
When a downstream element returns GST_FLOW_UNEXPECTED we want to: * let the dataqueue task running * forward the flow return upstream. This allows upstream elements to push EOS, and have that EOS event come downstream. Fixes #609274
This commit is contained in:
parent
9cc47f8cba
commit
4e0b2dc832
1 changed files with 4 additions and 5 deletions
|
@ -1101,7 +1101,8 @@ gst_multi_queue_loop (GstPad * pad)
|
||||||
result = gst_single_queue_push_one (mq, sq, object);
|
result = gst_single_queue_push_one (mq, sq, object);
|
||||||
sq->srcresult = result;
|
sq->srcresult = result;
|
||||||
|
|
||||||
if (result != GST_FLOW_OK && result != GST_FLOW_NOT_LINKED)
|
if (result != GST_FLOW_OK && result != GST_FLOW_NOT_LINKED
|
||||||
|
&& result != GST_FLOW_UNEXPECTED)
|
||||||
goto out_flushing;
|
goto out_flushing;
|
||||||
|
|
||||||
GST_LOG_OBJECT (mq, "AFTER PUSHING sq->srcresult: %s",
|
GST_LOG_OBJECT (mq, "AFTER PUSHING sq->srcresult: %s",
|
||||||
|
@ -1148,7 +1149,6 @@ gst_multi_queue_chain (GstPad * pad, GstBuffer * buffer)
|
||||||
GstSingleQueue *sq;
|
GstSingleQueue *sq;
|
||||||
GstMultiQueue *mq;
|
GstMultiQueue *mq;
|
||||||
GstMultiQueueItem *item;
|
GstMultiQueueItem *item;
|
||||||
GstFlowReturn ret = GST_FLOW_OK;
|
|
||||||
guint32 curid;
|
guint32 curid;
|
||||||
GstClockTime timestamp, duration;
|
GstClockTime timestamp, duration;
|
||||||
|
|
||||||
|
@ -1174,14 +1174,13 @@ gst_multi_queue_chain (GstPad * pad, GstBuffer * buffer)
|
||||||
apply_buffer (mq, sq, timestamp, duration, &sq->sink_segment);
|
apply_buffer (mq, sq, timestamp, duration, &sq->sink_segment);
|
||||||
|
|
||||||
done:
|
done:
|
||||||
return ret;
|
return sq->srcresult;
|
||||||
|
|
||||||
/* ERRORS */
|
/* ERRORS */
|
||||||
flushing:
|
flushing:
|
||||||
{
|
{
|
||||||
ret = sq->srcresult;
|
|
||||||
GST_LOG_OBJECT (mq, "SingleQueue %d : exit because task paused, reason: %s",
|
GST_LOG_OBJECT (mq, "SingleQueue %d : exit because task paused, reason: %s",
|
||||||
sq->id, gst_flow_get_name (ret));
|
sq->id, gst_flow_get_name (sq->srcresult));
|
||||||
gst_multi_queue_item_destroy (item);
|
gst_multi_queue_item_destroy (item);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue