ghostpad: The internally linked pad of the proxypad is the ghostpad
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Wed, 16 Mar 2011 10:53:53 +0000 (11:53 +0100)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Wed, 16 Mar 2011 10:53:53 +0000 (11:53 +0100)
Previously we were returning the peerpad, which is the target
of the ghostpad.

gst/gstghostpad.c

index f6280af..ba6c1b7 100644 (file)
@@ -132,11 +132,12 @@ static GstIterator *
 gst_proxy_pad_do_iterate_internal_links (GstPad * pad)
 {
   GstIterator *res = NULL;
-  GstPad *target = gst_proxy_pad_get_target (pad);
+  GstPad *internal = GST_PROXY_PAD_INTERNAL (pad);
 
-  if (target) {
-    res = gst_pad_iterate_internal_links (target);
-    gst_object_unref (target);
+  if (internal) {
+    res =
+        gst_iterator_new_single (GST_TYPE_PAD, internal,
+        (GstCopyFunction) gst_object_ref, (GFreeFunc) gst_object_unref);
   }
 
   return res;