mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
mpegtsbase: Error out on EOS without any pad
Avoids ending up with hanging pipelines
This commit is contained in:
parent
a4899af8d6
commit
77ece06a3f
1 changed files with 10 additions and 3 deletions
|
@ -1439,9 +1439,16 @@ error:
|
||||||
{
|
{
|
||||||
const gchar *reason = gst_flow_get_name (ret);
|
const gchar *reason = gst_flow_get_name (ret);
|
||||||
GST_DEBUG_OBJECT (base, "Pausing task, reason %s", reason);
|
GST_DEBUG_OBJECT (base, "Pausing task, reason %s", reason);
|
||||||
if (ret == GST_FLOW_UNEXPECTED)
|
if (ret == GST_FLOW_UNEXPECTED) {
|
||||||
GST_MPEGTS_BASE_GET_CLASS (base)->push_event (base, gst_event_new_eos ());
|
/* Push EOS downstream */
|
||||||
else if (ret == GST_FLOW_NOT_LINKED || ret < GST_FLOW_UNEXPECTED) {
|
if (!GST_MPEGTS_BASE_GET_CLASS (base)->push_event (base,
|
||||||
|
gst_event_new_eos ())) {
|
||||||
|
/* If that failed, emit an error so the pipeline can be stopped */
|
||||||
|
GST_ELEMENT_ERROR (base, STREAM, DEMUX, (NULL),
|
||||||
|
("got eos but no streams (yet)"));
|
||||||
|
|
||||||
|
}
|
||||||
|
} else if (ret == GST_FLOW_NOT_LINKED || ret < GST_FLOW_UNEXPECTED) {
|
||||||
GST_ELEMENT_ERROR (base, STREAM, FAILED,
|
GST_ELEMENT_ERROR (base, STREAM, FAILED,
|
||||||
(_("Internal data stream error.")),
|
(_("Internal data stream error.")),
|
||||||
("stream stopped, reason %s", reason));
|
("stream stopped, reason %s", reason));
|
||||||
|
|
Loading…
Reference in a new issue