diff --git a/ChangeLog b/ChangeLog index 33001ea2c5..12136ca101 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2006-04-28 Edward Hervey + + * gst/arg-types.py: + Caps used as arguments of virtual methods should keep their initial + refcount when calling the python methods. + This is similar to the patch done for GstMiniObjects. + * gst/gstbase.override: + Adjust the gst.BaseTransform.get_unit_size() virtual method for above + fix. + 2006-04-28 Артём Попов reviewed by: Edward Hervey diff --git a/gst/arg-types.py b/gst/arg-types.py index b9dbf41e3f..4fea63bfc5 100644 --- a/gst/arg-types.py +++ b/gst/arg-types.py @@ -192,7 +192,7 @@ class GstCapsParam(Parameter): " py_%s = Py_None;\n" "}" % (self.name, self.name, self.name, self.name)), - cleanup=("Py_DECREF(py_%s);" % self.name)) + cleanup=("gst_caps_ref(%s);\nPy_DECREF(py_%s);" % (self.name, self.name))) self.wrapper.add_pyargv_item("py_%s" % self.name) matcher.register_reverse('GstCaps*', GstCapsParam) diff --git a/gst/gstbase.override b/gst/gstbase.override index ec7067591a..ff5d07943d 100644 --- a/gst/gstbase.override +++ b/gst/gstbase.override @@ -472,7 +472,7 @@ _wrap_GstBaseTransform__proxy_do_get_unit_size (GstBaseTransform * self, } if (caps) - py_caps = pyg_boxed_new(GST_TYPE_CAPS, caps, FALSE, TRUE); // should copyval be TRUE instead? + py_caps = pyg_boxed_new(GST_TYPE_CAPS, caps, FALSE, FALSE); // should copyval be TRUE instead? else { Py_INCREF (Py_None); py_caps = Py_None;