? libs/gst/base/.gstcollectpads.c.swp
Index: libs/gst/base/gstcollectpads.c
===================================================================
RCS file: /cvs/gstreamer/gstreamer/libs/gst/base/gstcollectpads.c,v
retrieving revision 1.48
diff -u -p -u -p -r1.48 gstcollectpads.c
--- libs/gst/base/gstcollectpads.c	1 Feb 2007 17:52:11 -0000	1.48
+++ libs/gst/base/gstcollectpads.c	1 Feb 2007 18:50:07 -0000
@@ -134,6 +134,15 @@ gst_collect_pads_finalize (GObject * obj
   collected = pads->abidata.ABI.pad_list;
   for (; collected; collected = g_slist_next (collected)) {
     GstCollectData *pdata = (GstCollectData *) collected->data;
+    GstCollectDataDestroyNotify destroy_notify;
+
+    /* FIXME: Ugly hack as we can't add more fields to GstCollectData */
+    destroy_notify = (GstCollectDataDestroyNotify)
+        g_object_get_data (G_OBJECT (pdata->pad),
+            "gst-collect-data-destroy-notify");
+
+    if (destroy_notify)
+      destroy_notify (pdata);
 
     if (pdata->pad) {
       GST_DEBUG ("finalize pad %s:%s", GST_DEBUG_PAD_NAME (pdata->pad));
@@ -141,9 +150,6 @@ gst_collect_pads_finalize (GObject * obj
       pdata->pad = NULL;
     }
 
-    if (pdata->abidata.ABI.destroy_notify)
-      pdata->abidata.ABI.destroy_notify (pdata);
-
     g_free (pdata);
   }
   /* Free pads list */
@@ -207,19 +213,27 @@ ref_data (GstCollectData * data)
 static void
 unref_data (GstCollectData * data)
 {
+  GstCollectDataDestroyNotify destroy_notify;
+
   g_assert (data != NULL);
   g_assert (data->abidata.ABI.refcount > 0);
 
   if (!g_atomic_int_dec_and_test (&(data->abidata.ABI.refcount)))
     return;
 
+  /* FIXME: Ugly hack as we can't add more fields to GstCollectData */
+  destroy_notify = (GstCollectDataDestroyNotify)
+      g_object_get_data (G_OBJECT (data->pad),
+          "gst-collect-data-destroy-notify");
+
+  if (destroy_notify)
+    destroy_notify (data);
+
   g_object_unref (data->pad);
   if (data->buffer) {
     gst_buffer_unref (data->buffer);
   }
 
-  if (data->abidata.ABI.destroy_notify)
-    data->abidata.ABI.destroy_notify (data);
 
   g_free (data);
 }
@@ -310,7 +324,10 @@ gst_collect_pads_add_pad_full (GstCollec
   data->abidata.ABI.new_segment = FALSE;
   data->abidata.ABI.eos = FALSE;
   data->abidata.ABI.refcount = 1;
-  data->abidata.ABI.destroy_notify = destroy_notify;
+
+  /* FIXME: Ugly hack as we can't add more fields to GstCollectData */
+  g_object_set_data (G_OBJECT (pad), "gst-collect-data-destroy-notify",
+      destroy_notify);
 
   GST_COLLECT_PADS_PAD_LOCK (pads);
   GST_OBJECT_LOCK (pad);
Index: libs/gst/base/gstcollectpads.h
===================================================================
RCS file: /cvs/gstreamer/gstreamer/libs/gst/base/gstcollectpads.h,v
retrieving revision 1.20
diff -u -p -u -p -r1.20 gstcollectpads.h
--- libs/gst/base/gstcollectpads.h	1 Feb 2007 17:52:11 -0000	1.20
+++ libs/gst/base/gstcollectpads.h	1 Feb 2007 18:50:07 -0000
@@ -75,8 +75,6 @@ struct _GstCollectData
       gboolean           new_segment;
       gboolean           eos;
       gint               refcount;
-      /* since 0.10.12 */
-      GstCollectDataDestroyNotify  destroy_notify;
     } ABI;
     /* adding + 0 to mark ABI change to be undone later */
     gpointer _gst_reserved[GST_PADDING + 0];
