gst/arg-types.py: Caps used as arguments of virtual methods should keep their initial refcount when calling the pytho...

Original commit message from CVS:
* 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.
This commit is contained in:
Edward Hervey 2006-04-28 17:35:26 +00:00
parent c2f10c765f
commit 0d89737bf7
3 changed files with 12 additions and 2 deletions

View file

@ -1,3 +1,13 @@
2006-04-28 Edward Hervey <edward@fluendo.com>
* 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 Артём Попов <artfwo@gmail.com>
reviewed by: Edward Hervey <edward@fluendo.com>

View file

@ -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)

View file

@ -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;