[0.11] gstreamer: pad: handle NULL callbacks

Wim Taymans wtay at kemper.freedesktop.org
Tue Feb 21 07:41:53 PST 2012


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

Author: Wim Taymans <wim.taymans at collabora.co.uk>
Date:   Tue Feb 21 16:37:11 2012 +0100

pad: handle NULL callbacks

When we have a matching NULL callback, also consider the 'callback' marshalled,
this way blocking probes with a NULL callback actually work.

---

 gst/gstpad.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/gst/gstpad.c b/gst/gstpad.c
index f7802d5..32cf6f4 100644
--- a/gst/gstpad.c
+++ b/gst/gstpad.c
@@ -2849,6 +2849,8 @@ probe_hook_marshal (GHook * hook, ProbeMarshall * data)
       "hook %lu, cookie %u with flags 0x%08x matches", hook->hook_id,
       PROBE_COOKIE (hook), flags);
 
+  data->marshalled = TRUE;
+
   callback = (GstPadProbeCallback) hook->func;
   if (callback == NULL)
     return;
@@ -2860,7 +2862,6 @@ probe_hook_marshal (GHook * hook, ProbeMarshall * data)
   ret = callback (pad, info, hook->data);
 
   GST_OBJECT_LOCK (pad);
-  data->marshalled = TRUE;
 
   switch (ret) {
     case GST_PAD_PROBE_REMOVE:



More information about the gstreamer-commits mailing list