Freeing pointers in a GstBuffer's data

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Freeing pointers in a GstBuffer's data

iron_guitarist1987
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?
All your bases are belong to us.
Reply | Threaded
Open this post in threaded view
|

Re: Freeing pointers in a GstBuffer's data

Josh Doe
On Thu, Sep 27, 2012 at 2:33 PM, iron_guitarist1987
<[hidden email]> 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
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel