dvdemux: Don't use GST_FLOW_IS_FATAL()

This commit is contained in:
Sebastian Dröge 2010-08-27 18:09:11 +02:00
parent b606ab06e5
commit 0cf904f0bb

View file

@ -1735,24 +1735,21 @@ pause:
GST_INFO_OBJECT (dvdemux, "pausing task, %s", gst_flow_get_name (ret)); GST_INFO_OBJECT (dvdemux, "pausing task, %s", gst_flow_get_name (ret));
dvdemux->running = FALSE; dvdemux->running = FALSE;
gst_pad_pause_task (dvdemux->sinkpad); gst_pad_pause_task (dvdemux->sinkpad);
if (GST_FLOW_IS_FATAL (ret) || ret == GST_FLOW_NOT_LINKED) { if (ret == GST_FLOW_UNEXPECTED) {
if (ret == GST_FLOW_UNEXPECTED) { GST_LOG_OBJECT (dvdemux, "got eos");
GST_LOG_OBJECT (dvdemux, "got eos"); /* perform EOS logic */
/* perform EOS logic */ if (dvdemux->time_segment.flags & GST_SEEK_FLAG_SEGMENT) {
if (dvdemux->time_segment.flags & GST_SEEK_FLAG_SEGMENT) { gst_element_post_message (GST_ELEMENT (dvdemux),
gst_element_post_message (GST_ELEMENT (dvdemux), gst_message_new_segment_done (GST_OBJECT_CAST (dvdemux),
gst_message_new_segment_done (GST_OBJECT_CAST (dvdemux), dvdemux->time_segment.format, dvdemux->time_segment.last_stop));
dvdemux->time_segment.format,
dvdemux->time_segment.last_stop));
} else {
gst_dvdemux_push_event (dvdemux, gst_event_new_eos ());
}
} else { } else {
/* for fatal errors or not-linked we post an error message */
GST_ELEMENT_ERROR (dvdemux, STREAM, FAILED,
(NULL), ("streaming stopped, reason %s", gst_flow_get_name (ret)));
gst_dvdemux_push_event (dvdemux, gst_event_new_eos ()); gst_dvdemux_push_event (dvdemux, gst_event_new_eos ());
} }
} else if (ret == GST_FLOW_NOT_LINKED || ret < GST_FLOW_UNEXPECTED) {
/* for fatal errors or not-linked we post an error message */
GST_ELEMENT_ERROR (dvdemux, STREAM, FAILED,
(NULL), ("streaming stopped, reason %s", gst_flow_get_name (ret)));
gst_dvdemux_push_event (dvdemux, gst_event_new_eos ());
} }
goto done; goto done;
} }