From 2137ae524d885ca7d353a6863c25c024ba074342 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 27 Aug 2010 18:56:23 +0200 Subject: [PATCH] sfsink: Don't use GST_FLOW_IS_FATAL() --- ext/sndfile/gstsfsink.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/ext/sndfile/gstsfsink.c b/ext/sndfile/gstsfsink.c index 2bdb2fe..4ac979b 100644 --- a/ext/sndfile/gstsfsink.c +++ b/ext/sndfile/gstsfsink.c @@ -428,14 +428,13 @@ paused: gst_flow_get_name (result)); gst_pad_pause_task (pad); /* fatal errors and NOT_LINKED cause EOS */ - if (GST_FLOW_IS_FATAL (result) || result == GST_FLOW_NOT_LINKED) { + if (result == GST_FLOW_UNEXPECTED) { + gst_pad_send_event (pad, gst_event_new_eos ()); + } else if (result < GST_FLOW_UNEXPECTED || result == GST_FLOW_NOT_LINKED) { + GST_ELEMENT_ERROR (basesink, STREAM, FAILED, + (_("Internal data stream error.")), + ("stream stopped, reason %s", gst_flow_get_name (result))); gst_pad_send_event (pad, gst_event_new_eos ()); - /* EOS does not cause an ERROR message */ - if (result != GST_FLOW_UNEXPECTED) { - GST_ELEMENT_ERROR (basesink, STREAM, FAILED, - (_("Internal data stream error.")), - ("stream stopped, reason %s", gst_flow_get_name (result))); - } } gst_object_unref (this); return; -- 2.7.4