[gst-cvs] gst-plugins-bad: sfsink: Don't use GST_FLOW_IS_FATAL()

Sebastian Dröge slomo at kemper.freedesktop.org
Tue Sep 21 03:29:29 PDT 2010


Module: gst-plugins-bad
Branch: master
Commit: 2137ae524d885ca7d353a6863c25c024ba074342
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=2137ae524d885ca7d353a6863c25c024ba074342

Author: Sebastian Dröge <sebastian.droege at collabora.co.uk>
Date:   Fri Aug 27 18:56:23 2010 +0200

sfsink: Don't use GST_FLOW_IS_FATAL()

---

 ext/sndfile/gstsfsink.c |   13 ++++++-------
 1 files 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;





More information about the Gstreamer-commits mailing list