Use the new API to post flow ERROR messages on the bus

https://bugzilla.gnome.org/show_bug.cgi?id=770158
This commit is contained in:
Thibault Saunier 2016-08-19 11:11:14 -07:00 committed by Thibault Saunier
parent 40dbcd1b3e
commit 3e27368ce3
3 changed files with 4 additions and 10 deletions

View file

@ -450,8 +450,7 @@ pause:
gst_pad_push_event (pad, gst_event_new_eos ());
} else if (ret < GST_FLOW_EOS || ret == GST_FLOW_NOT_LINKED) {
/* for fatal errors we post an error message */
GST_ELEMENT_ERROR (siddec, STREAM, FAILED,
(NULL), ("streaming task paused, reason %s", reason));
GST_ELEMENT_FLOW_ERROR (siddec, ret);
gst_pad_push_event (pad, gst_event_new_eos ());
}

View file

@ -449,9 +449,7 @@ gst_asf_demux_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
}
flow = gst_asf_demux_push_complete_payloads (demux, TRUE);
if (flow < GST_FLOW_EOS || flow == GST_FLOW_NOT_LINKED) {
GST_ELEMENT_ERROR (demux, STREAM, FAILED,
(_("Internal data stream error.")),
("streaming stopped, reason %s", gst_flow_get_name (flow)));
GST_ELEMENT_FLOW_ERROR (demux, flow);
break;
}
@ -2123,9 +2121,7 @@ pause:
/* For the error cases */
if (flow < GST_FLOW_EOS || flow == GST_FLOW_NOT_LINKED) {
/* Post an error. Hopefully something else already has, but if not... */
GST_ELEMENT_ERROR (demux, STREAM, FAILED,
(_("Internal data stream error.")),
("streaming stopped, reason %s", gst_flow_get_name (flow)));
GST_ELEMENT_FLOW_ERROR (demux, flow);
gst_asf_demux_send_event_unlocked (demux, gst_event_new_eos ());
}

View file

@ -967,8 +967,7 @@ need_pause:
gst_rmdemux_send_event (rmdemux, gst_event_new_eos ());
}
} else if (ret == GST_FLOW_NOT_LINKED || ret < GST_FLOW_EOS) {
GST_ELEMENT_ERROR (rmdemux, STREAM, FAILED,
(NULL), ("stream stopped, reason %s", reason));
GST_ELEMENT_FLOW_ERROR (rmdemux, ret);
gst_rmdemux_send_event (rmdemux, gst_event_new_eos ());
}
return;