Freeing pointers in a GstBuffer's data

Josh Doe josh at joshdoe.com
Thu Sep 27 12:37:22 PDT 2012


On Thu, Sep 27, 2012 at 2:33 PM, iron_guitarist1987
<jtrinidadperez at gmail.com> wrote:
> My custom elements use structures in their buffers. These structures have
> pointers in them.
> I am seeing some memory leaks in my pipeline. Could it be that the data
> pointed by these pointers is not being freed once the buffers are unreffed?

Assuming you're using 0.10, if you allocate the memory yourself you
need to set GST_BUFFER_MALLOCDATA and GST_BUFFER_FREE_FUNC
appropriately:
http://gstreamer.freedesktop.org/data/doc/gstreamer/0.10.36/gstreamer/html/gstreamer-GstBuffer.html#GST-BUFFER-FREE-FUNC:CAPS

-Josh


More information about the gstreamer-devel mailing list