[gst-devel] GstBuffer mem leak in fakesrc

Riccardo Corona coronariccardo at gmail.com
Mon Jun 18 16:08:40 CEST 2007

How to free a gstbuffer filled into a fakesrc callback function?My gst-app
gets mpeg4 packets into the callback function and fill the gstbuffer with
the compressed data; all works well but there's a large mem leak.
Here's the way I fill the buffer:

static void cb_handoff (GstElement *fakesrc,
        GstBuffer  *buffer,
        GstPad     *pad,
        gpointer    user_data)

.....//image contain compressed data and usefull info...

GST_BUFFER_MALLOCDATA(buffer) =    (unsigned char*) g_memdup
 GST_BUFFER_SIZE(buffer) = image->dimension;
delete image;


Is there a way to clean the buffer after the data overstep the final sink
element (directdrawsink)?

Riccardo Corona
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20070618/361e0199/attachment.htm>

More information about the gstreamer-devel mailing list