mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +00:00
queue2: post error message when pausing task if so appropriate
If a downstream element returns an error while upstream has already put all data into queue2 (including EOS), upstream will no longer chain into queue2, so it is up to queue2 to perform some EOS handling / message posting in such cases. See #589991.
This commit is contained in:
parent
ec81bbf713
commit
f766708c17
1 changed files with 13 additions and 0 deletions
|
@ -1658,10 +1658,23 @@ gst_queue_loop (GstPad * pad)
|
||||||
/* ERRORS */
|
/* ERRORS */
|
||||||
out_flushing:
|
out_flushing:
|
||||||
{
|
{
|
||||||
|
gboolean eos = queue->is_eos;
|
||||||
|
GstFlowReturn ret = queue->srcresult;
|
||||||
|
|
||||||
gst_pad_pause_task (queue->srcpad);
|
gst_pad_pause_task (queue->srcpad);
|
||||||
GST_CAT_LOG_OBJECT (queue_dataflow, queue,
|
GST_CAT_LOG_OBJECT (queue_dataflow, queue,
|
||||||
"pause task, reason: %s", gst_flow_get_name (queue->srcresult));
|
"pause task, reason: %s", gst_flow_get_name (queue->srcresult));
|
||||||
GST_QUEUE_MUTEX_UNLOCK (queue);
|
GST_QUEUE_MUTEX_UNLOCK (queue);
|
||||||
|
/* let app know about us giving up if upstream is not expected to do so */
|
||||||
|
/* UNEXPECTED is already taken care of elsewhere */
|
||||||
|
if (eos && (GST_FLOW_IS_FATAL (ret) || ret == GST_FLOW_NOT_LINKED) &&
|
||||||
|
(ret != GST_FLOW_UNEXPECTED)) {
|
||||||
|
GST_ELEMENT_ERROR (queue, STREAM, FAILED,
|
||||||
|
(_("Internal data flow error.")),
|
||||||
|
("streaming task paused, reason %s (%d)",
|
||||||
|
gst_flow_get_name (ret), ret));
|
||||||
|
gst_pad_push_event (queue->srcpad, gst_event_new_eos ());
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue