asfdemux: Don't error out on non-critical flow returns

Only error out when downstream returns:
* NOT_SUPPORTED
* ERROR
* NOT_NEGOTIATED
* NOT_LINKED

If we got _UNEXPECTED, we push an EOS downstream (since maybe only one
of the streams had gone EOS) and then stop the task silently.

In the case of WRONG_STATE we just need to stop silently

https://bugzilla.gnome.org/show_bug.cgi?id=600412
This commit is contained in:
Edward Hervey 2010-08-27 17:50:59 +02:00
parent ce8e49c956
commit 776a09149e

View file

@ -1650,11 +1650,15 @@ pause:
gst_pad_pause_task (demux->sinkpad);
/* For the error cases (not EOS) */
if (!sent_eos && (GST_FLOW_IS_FATAL (flow) || 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)));
if (!sent_eos) {
if (flow == GST_FLOW_UNEXPECTED)
gst_asf_demux_send_event_unlocked (demux, gst_event_new_eos ());
else if (flow < GST_FLOW_UNEXPECTED || 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)));
}
}
return;
}