bilboed gst-python: gst-python/ gst-python/gst/
[email protected] Sat, 6 Dec 2008 07:52:46 -0800 (PST)
| Newsgroups | gmane.comp.video.gstreamer.cvs |
|---|---|
| Message-ID | <[email protected]> |
CVS Root: /cvs/gstreamer
Module: gst-python
Changes by: bilboed
Date: Sat Dec 06 2008 15:52:46 UTC
Log message:
* gst/gstpad.override:
Fix memory leak for functions that return a newly created buffer as
a function argument.
Fixes #554545
Modified files:
. : ChangeLog
gst : gstpad.override
Links:
http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-python/ChangeLog.diff?r1=1.698&r2=1.699
http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-python/gst/gstpad.override.diff?r1=1.47&r2=1.48
====Begin Diffs====
Index: ChangeLog
===================================================================
RCS file: /cvs/gstreamer/gst-python/ChangeLog,v
retrieving revision 1.698
retrieving revision 1.699
diff -u -d -r1.698 -r1.699
--- ChangeLog 6 Dec 2008 15:41:39 -0000 1.698
+++ ChangeLog 6 Dec 2008 15:52:31 -0000 1.699
@@ -1,5 +1,12 @@
2008-12-06 Edward Hervey <[email protected]>
+ * gst/gstpad.override:
+ Fix memory leak for functions that return a newly created buffer as
+ a function argument.
+ Fixes #554545
+
+2008-12-06 Edward Hervey <[email protected]>
* codegen/argtypes.py:
Add handling of 'keep-refcount' for GBoxed arguments.
* gst/gst.defs:
Index: gstpad.override
RCS file: /cvs/gstreamer/gst-python/gst/gstpad.override,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -d -r1.47 -r1.48
--- gstpad.override 27 Jun 2008 08:39:37 -0000 1.47
+++ gstpad.override 6 Dec 2008 15:52:31 -0000 1.48
@@ -942,6 +942,9 @@
if (rv)
GST_PAD_DO_EVENT_SIGNALS (pad)++;
+ GST_PAD_DO_BUFFER_SIGNALS (pad)++;
+ GST_DEBUG ("adding event probe to pad %s:%s, now %d probes",
+ GST_DEBUG_PAD_NAME (pad), GST_PAD_DO_BUFFER_SIGNALS (pad));
GST_OBJECT_UNLOCK (pad);
Py_DECREF(myargs);
@@ -1140,6 +1143,9 @@
PyList_SetItem(ret, 1, Py_None);
} else {
PyList_SetItem(ret, 1, pygstminiobject_new(GST_MINI_OBJECT(buf)));
+ /* Bring down the reference count, since we are meant to be the only
+ * one holding a reference to the newly created buffer. */
+ gst_buffer_unref (buf);
}
return ret;
}
@@ -1170,6 +1176,9 @@
@@ -1197,6 +1206,9 @@
@@ -1224,6 +1236,9 @@
------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you. Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/