[gstreamer-bugs] [Bug 554545] Memory leak using pulldriven pipeline

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Wed Oct 1 03:51:59 PDT 2008


If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
  http://bugzilla.gnome.org/show_bug.cgi?id=554545

  GStreamer | gst-python | Ver: HEAD CVS




------- Comment #4 from Stefan Wehner  2008-10-01 10:51 UTC -------
We've observed that when creating events, after creating the
pygstminiobject_new, the original object is unreffed.
Shouldn't this be also done in the functions in gstpad.override - like this:
%%
override gst_pad_pull_range kwargs
static PyObject *
_wrap_gst_pad_pull_range (PyGObject *self, PyObject * args, PyObject *kwargs)
{
    static char *kwlist[] = {"offset", "size", NULL};
    guint64    offset;
    gint    size;
    PyObject    *ret;
    GstBuffer    *buf;
    GstFlowReturn    res;

    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
                     "Ki:GstPad.pull_range",
                     kwlist, &offset, &size))
    return NULL;
    res = gst_pad_pull_range (GST_PAD(pygobject_get(self)),
                  offset, size, &buf);
    ret = PyList_New(2);
    PyList_SetItem(ret, 0, pyg_enum_from_gtype(GST_TYPE_FLOW_RETURN, res));
    if (res != GST_FLOW_OK) {
        PyList_SetItem(ret, 1, Py_None);
    } else {
        PyList_SetItem(ret, 1, pygstminiobject_new(GST_MINI_OBJECT(buf)));


        //unreffing original object like it is
        //done e.g. in _wrap_gst_event_new_custom
        gst_mini_object_unref(GST_MINI_OBJECT(buf));
    }
    return ret;
}


When we unref this object, the memory leaks disappear.
%%


-- 
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.

You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=554545.




More information about the Gstreamer-bugs mailing list