[gst-cvs] gst-plugins-good: dvdemux: Don't use GST_FLOW_IS_FATAL()

Sebastian Dröge slomo at kemper.freedesktop.org
Sat Sep 4 05:56:26 PDT 2010


Module: gst-plugins-good
Branch: master
Commit: 0cf904f0bbd8de950494bb7184b981d4b1d80904
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=0cf904f0bbd8de950494bb7184b981d4b1d80904

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

dvdemux: Don't use GST_FLOW_IS_FATAL()

---

 ext/dv/gstdvdemux.c |   27 ++++++++++++---------------
 1 files changed, 12 insertions(+), 15 deletions(-)

diff --git a/ext/dv/gstdvdemux.c b/ext/dv/gstdvdemux.c
index 101a7ad..0308249 100644
--- a/ext/dv/gstdvdemux.c
+++ b/ext/dv/gstdvdemux.c
@@ -1735,24 +1735,21 @@ pause:
     GST_INFO_OBJECT (dvdemux, "pausing task, %s", gst_flow_get_name (ret));
     dvdemux->running = FALSE;
     gst_pad_pause_task (dvdemux->sinkpad);
-    if (GST_FLOW_IS_FATAL (ret) || ret == GST_FLOW_NOT_LINKED) {
-      if (ret == GST_FLOW_UNEXPECTED) {
-        GST_LOG_OBJECT (dvdemux, "got eos");
-        /* perform EOS logic */
-        if (dvdemux->time_segment.flags & GST_SEEK_FLAG_SEGMENT) {
-          gst_element_post_message (GST_ELEMENT (dvdemux),
-              gst_message_new_segment_done (GST_OBJECT_CAST (dvdemux),
-                  dvdemux->time_segment.format,
-                  dvdemux->time_segment.last_stop));
-        } else {
-          gst_dvdemux_push_event (dvdemux, gst_event_new_eos ());
-        }
+    if (ret == GST_FLOW_UNEXPECTED) {
+      GST_LOG_OBJECT (dvdemux, "got eos");
+      /* perform EOS logic */
+      if (dvdemux->time_segment.flags & GST_SEEK_FLAG_SEGMENT) {
+        gst_element_post_message (GST_ELEMENT (dvdemux),
+            gst_message_new_segment_done (GST_OBJECT_CAST (dvdemux),
+                dvdemux->time_segment.format, dvdemux->time_segment.last_stop));
       } 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 ());
       }
+    } 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;
   }





More information about the Gstreamer-commits mailing list