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

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


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

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

asfparse: Don't use GST_FLOW_IS_FATAL()

Also don't push EOS downstream on WRONG_STATE, it will be dropped anyway.

---

 gst/asfmux/gstasfparse.c |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/gst/asfmux/gstasfparse.c b/gst/asfmux/gstasfparse.c
index 44b2acb..677ea3b 100644
--- a/gst/asfmux/gstasfparse.c
+++ b/gst/asfmux/gstasfparse.c
@@ -352,12 +352,11 @@ pause:
     GST_INFO_OBJECT (asfparse, "Pausing sinkpad task");
     gst_pad_pause_task (pad);
 
-    if (GST_FLOW_IS_FATAL (ret) || ret == GST_FLOW_NOT_LINKED) {
-      if (ret == GST_FLOW_UNEXPECTED) {
-      } else {
-        GST_ELEMENT_ERROR (asfparse, STREAM, FAILED,
-            (NULL), ("streaming task paused, reason %s (%d)", reason, ret));
-      }
+    if (ret == GST_FLOW_UNEXPECTED) {
+      gst_pad_push_event (asfparse->srcpad, gst_event_new_eos ());
+    } else if (ret == GST_FLOW_NOT_LINKED || ret < GST_FLOW_UNEXPECTED) {
+      GST_ELEMENT_ERROR (asfparse, STREAM, FAILED,
+          (NULL), ("streaming task paused, reason %s (%d)", reason, ret));
       gst_pad_push_event (asfparse->srcpad, gst_event_new_eos ());
     }
   }





More information about the Gstreamer-commits mailing list