mpegtsbase: Post an error message when EOS'ing without source pads

This ensures we don't "hang" when files can't be decoded, or contain
no valid streams.
This commit is contained in:
Edward Hervey 2013-05-23 14:57:49 +02:00
parent 7837cab44e
commit ce441cbff7

View file

@ -1613,7 +1613,11 @@ error:
const gchar *reason = gst_flow_get_name (ret);
GST_DEBUG_OBJECT (base, "Pausing task, reason %s", reason);
if (ret == GST_FLOW_EOS) {
GST_MPEGTS_BASE_GET_CLASS (base)->push_event (base, gst_event_new_eos ());
if (!GST_MPEGTS_BASE_GET_CLASS (base)->push_event (base,
gst_event_new_eos ()))
GST_ELEMENT_ERROR (base, STREAM, FAILED,
(_("Internal data stream error.")),
("No program activated before EOS"));
} else if (ret == GST_FLOW_NOT_LINKED || ret < GST_FLOW_EOS) {
GST_ELEMENT_ERROR (base, STREAM, FAILED,
(_("Internal data stream error.")),