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:09:27 -07:00 committed by Thibault Saunier
parent f70aa5b033
commit bc6aae6ca7
2 changed files with 3 additions and 7 deletions

View file

@ -4802,8 +4802,7 @@ seek_failed:
if (flushing) { if (flushing) {
ret = GST_FLOW_FLUSHING; ret = GST_FLOW_FLUSHING;
} else { } else {
GST_ELEMENT_ERROR (ogg, STREAM, DEMUX, (NULL), GST_ELEMENT_FLOW_ERROR (ogg, ret);
("failed to start demuxing ogg"));
ret = GST_FLOW_ERROR; ret = GST_FLOW_ERROR;
} }
goto pause; goto pause;
@ -4845,9 +4844,7 @@ pause:
event = gst_event_new_eos (); event = gst_event_new_eos ();
} }
} else if (ret == GST_FLOW_NOT_LINKED || ret < GST_FLOW_EOS) { } else if (ret == GST_FLOW_NOT_LINKED || ret < GST_FLOW_EOS) {
GST_ELEMENT_ERROR (ogg, STREAM, FAILED, GST_ELEMENT_FLOW_ERROR (ogg, ret);
(_("Internal data stream error.")),
("stream stopped, reason %s", reason));
event = gst_event_new_eos (); event = gst_event_new_eos ();
} }

View file

@ -1520,8 +1520,7 @@ pause:
} }
} else if (ret == GST_FLOW_NOT_LINKED || ret < GST_FLOW_EOS) { } else if (ret == GST_FLOW_NOT_LINKED || ret < GST_FLOW_EOS) {
/* for fatal errors we post an error message */ /* for fatal errors we post an error message */
GST_ELEMENT_ERROR (demux, STREAM, FAILED, (NULL), GST_ELEMENT_FLOW_ERROR (demux, ret);
("Stream stopped, reason %s", reason));
push_eos = TRUE; push_eos = TRUE;
} }
if (push_eos) { if (push_eos) {