From: <jd...@fr...> - 2004-11-04 10:44:45
|
CVS Root: /cvs/gstreamer Module: gst-python Changes by: jdahlin Date: Thu Nov 04 2004 02:44:40 PST Log message: * gst/interfaces.override (_wrap_gst_mixer_list_tracks): Impl. (_wrap_gst_tuner_list_norms, _wrap_gst_tuner_list_channels): Plug leaks. Modified files: . : ChangeLog gst : interfaces.override Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-python/ChangeLog.diff?r1=1.133&r2=1.134 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-python/gst/interfaces.override.diff?r1=1.5&r2=1.6 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gst-python/ChangeLog,v retrieving revision 1.133 retrieving revision 1.134 diff -u -d -r1.133 -r1.134 --- ChangeLog 11 Oct 2004 17:48:36 -0000 1.133 +++ ChangeLog 4 Nov 2004 10:44:28 -0000 1.134 @@ -1,3 +1,9 @@ +2004-11-04 Johan Dahlin <jo...@gn...> + + * gst/interfaces.override (_wrap_gst_mixer_list_tracks): Impl. + (_wrap_gst_tuner_list_norms, _wrap_gst_tuner_list_channels): Plug + leaks. === release 0.7.93 === 2004-10-11 Johan Dahlin <jo...@gn...> Index: interfaces.override RCS file: /cvs/gstreamer/gst-python/gst/interfaces.override,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- interfaces.override 12 Aug 2004 17:05:33 -0000 1.5 +++ interfaces.override 4 Nov 2004 10:44:28 -0000 1.6 @@ -65,7 +65,9 @@ py_list = PyList_New(0); for (l = list; l; l = l->next) { GstTunerChannel *channel = (GstTunerChannel*)l->data; - PyList_Append(py_list, pygobject_new(G_OBJECT(channel))); + PyObject *py_channel = pygobject_new(G_OBJECT(channel)); + PyList_Append(py_list, py_channel); + Py_DECREF(py_channel); } return py_list; @@ -83,7 +85,29 @@ GstTunerNorm *norm = (GstTunerNorm*)l->data; - PyList_Append(py_list, pygobject_new(G_OBJECT(norm))); + PyObject *py_norm = pygobject_new(G_OBJECT(norm)); + PyList_Append(py_list, py_norm); + Py_DECREF(py_norm); + } + + return py_list; +} +%% +override gst_mixer_list_tracks noargs +static PyObject * +_wrap_gst_mixer_list_tracks(PyGObject *self) +{ + const GList *l, *list; + PyObject *py_list; + + list = gst_mixer_list_tracks(GST_MIXER(self->obj)); + + py_list = PyList_New(0); + for (l = list; l; l = l->next) { + GstMixerTrack *track = (GstMixerTrack*)l->data; + PyObject *py_track = pygobject_new(G_OBJECT(track)); + PyList_Append(py_list, py_track); + Py_DECREF(py_track); |