[0.11] gst-plugins-base: adder: Update for new collectpads2 event handling API

Sebastian Dröge slomo at kemper.freedesktop.org
Thu Jan 26 01:46:11 PST 2012


Module: gst-plugins-base
Branch: 0.11
Commit: c07271ea0287762801412c61f9f24c6b09675052
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=c07271ea0287762801412c61f9f24c6b09675052

Author: Sebastian Dröge <sebastian.droege at collabora.co.uk>
Date:   Thu Jan 26 10:27:00 2012 +0100

adder: Update for new collectpads2 event handling API

---

 gst/adder/gstadder.c |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/gst/adder/gstadder.c b/gst/adder/gstadder.c
index 1358f32..7a97e14 100644
--- a/gst/adder/gstadder.c
+++ b/gst/adder/gstadder.c
@@ -1299,13 +1299,21 @@ gst_adder_event (GstCollectPads2 * pads, GstCollectData2 * pad,
   if (GST_EVENT_TYPE (event) == GST_EVENT_FLUSH_STOP) {
     if (g_atomic_int_compare_and_exchange (&adder->flush_stop_pending,
             TRUE, FALSE)) {
-      return FALSE;
+
+      return gst_pad_event_default (pad->pad, GST_OBJECT (user_data), event);
     } else {
       gst_event_unref (event);
       return TRUE;
     }
   } else {
-    return FALSE;
+    if (GST_EVENT_TYPE (event) == GST_EVENT_SEGMENT ||
+        GST_EVENT_TYPE (event) == GST_EVENT_CAPS ||
+        GST_EVENT_TYPE (event) == GST_EVENT_EOS) {
+      gst_event_unref (event);
+      return TRUE;
+    } else {
+      return gst_pad_event_default (pad->pad, GST_OBJECT (user_data), event);
+    }
   }
 }
 



More information about the gstreamer-commits mailing list