[0.11] gstreamer: GST_FLOW_UNEXPECTED -> GST_FLOW_EOS

Wim Taymans wtay at kemper.freedesktop.org
Tue Jan 3 06:29:16 PST 2012


Module: gstreamer
Branch: 0.11
Commit: bc1974e962251320496fd7448be64457b782dae4
URL:    http://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=bc1974e962251320496fd7448be64457b782dae4

Author: Wim Taymans <wim.taymans at collabora.co.uk>
Date:   Tue Jan  3 15:25:31 2012 +0100

GST_FLOW_UNEXPECTED -> GST_FLOW_EOS

---

 gst/gstcompat.h                 |    2 --
 libs/gst/base/gstcollectpads2.c |   12 ++++++------
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/gst/gstcompat.h b/gst/gstcompat.h
index 5b607bf..8fe8c52 100644
--- a/gst/gstcompat.h
+++ b/gst/gstcompat.h
@@ -51,8 +51,6 @@ G_BEGIN_DECLS
 
 #define gst_buffer_new_and_alloc(s)            gst_buffer_new_allocate(NULL, s, 0)
 
-#define GST_FLOW_UNEXPECTED           GST_FLOW_EOS
-
 #define GST_BUFFER_TIMESTAMP          GST_BUFFER_PTS
 #define GST_BUFFER_TIMESTAMP_IS_VALID GST_BUFFER_PTS_IS_VALID
 
diff --git a/libs/gst/base/gstcollectpads2.c b/libs/gst/base/gstcollectpads2.c
index 970ae54..cf1f500 100644
--- a/libs/gst/base/gstcollectpads2.c
+++ b/libs/gst/base/gstcollectpads2.c
@@ -1540,7 +1540,7 @@ gst_collect_pads2_default_collected (GstCollectPads2 * pads, gpointer user_data)
   if (G_UNLIKELY (best == NULL)) {
     ret = func (pads, best, NULL, buffer_user_data);
     if (ret == GST_FLOW_OK)
-      ret = GST_FLOW_UNEXPECTED;
+      ret = GST_FLOW_EOS;
     goto done;
   }
 
@@ -1829,7 +1829,7 @@ gst_collect_pads2_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
   /* pad was EOS, we can refuse this data */
   if (G_UNLIKELY (GST_COLLECT_PADS2_STATE_IS_SET (data,
               GST_COLLECT_PADS2_STATE_EOS)))
-    goto unexpected;
+    goto eos;
 
   /* see if we need to clip */
   if (pads->clip_func) {
@@ -1840,8 +1840,8 @@ gst_collect_pads2_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
     if (G_UNLIKELY (outbuf == NULL))
       goto clipped;
 
-    if (G_UNLIKELY (ret == GST_FLOW_UNEXPECTED))
-      goto unexpected;
+    if (G_UNLIKELY (ret == GST_FLOW_EOS))
+      goto eos;
     else if (G_UNLIKELY (ret != GST_FLOW_OK))
       goto error;
   }
@@ -1953,12 +1953,12 @@ flushing:
     ret = GST_FLOW_WRONG_STATE;
     goto unlock_done;
   }
-unexpected:
+eos:
   {
     /* we should not post an error for this, just inform upstream that
      * we don't expect anything anymore */
     GST_DEBUG ("pad %s:%s is eos", GST_DEBUG_PAD_NAME (pad));
-    ret = GST_FLOW_UNEXPECTED;
+    ret = GST_FLOW_EOS;
     goto unlock_done;
   }
 clipped:



More information about the gstreamer-commits mailing list