mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
queue: Post errors when receiving EOS after downstream returned an error
There might be no further data flow that would allow us to propagate the error upstream, causing nobody to post an error at all.
This commit is contained in:
parent
afcc93254b
commit
6a261b1fc2
1 changed files with 12 additions and 3 deletions
|
@ -806,11 +806,20 @@ gst_queue_handle_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||||
/* Errors in sticky event pushing are no problem and ignored here
|
/* Errors in sticky event pushing are no problem and ignored here
|
||||||
* as they will cause more meaningful errors during data flow.
|
* as they will cause more meaningful errors during data flow.
|
||||||
* For EOS events, that are not followed by data flow, we still
|
* For EOS events, that are not followed by data flow, we still
|
||||||
* return FALSE here though.
|
* return FALSE here though and report an error.
|
||||||
*/
|
*/
|
||||||
if (!GST_EVENT_IS_STICKY (event) ||
|
if (!GST_EVENT_IS_STICKY (event)) {
|
||||||
GST_EVENT_TYPE (event) == GST_EVENT_EOS)
|
|
||||||
goto out_flow_error;
|
goto out_flow_error;
|
||||||
|
} else if (GST_EVENT_TYPE (event) == GST_EVENT_EOS) {
|
||||||
|
if (queue->srcresult == GST_FLOW_NOT_LINKED
|
||||||
|
|| queue->srcresult < GST_FLOW_EOS) {
|
||||||
|
GST_ELEMENT_ERROR (queue, STREAM, FAILED,
|
||||||
|
(_("Internal data flow error.")),
|
||||||
|
("streaming task paused, reason %s (%d)",
|
||||||
|
gst_flow_get_name (queue->srcresult), queue->srcresult));
|
||||||
|
}
|
||||||
|
goto out_flow_error;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/* refuse more events on EOS */
|
/* refuse more events on EOS */
|
||||||
if (queue->eos)
|
if (queue->eos)
|
||||||
|
|
Loading…
Reference in a new issue