Hi,<br>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.
<br>Here's the way I fill the buffer:<br><br><br><br>static void cb_handoff (GstElement *fakesrc,<br> GstBuffer *buffer,<br> GstPad *pad,<br> gpointer user_data)<br>{<br><br>.....//image contain compressed data and usefull info...
<br><br>GST_BUFFER_MALLOCDATA(buffer) = (unsigned char*) g_memdup (image->pixel_ptr,image->dimension);<br> GST_BUFFER_DATA(buffer) = GST_BUFFER_MALLOCDATA(buffer);<br> GST_BUFFER_SIZE(buffer) = image->dimension;
<br>delete image;<br>image=NULL;<br><br>.....<br clear="all">}<br><br>Is there a way to clean the buffer after the data overstep the final sink element (directdrawsink)?<br>Thank's.<br><br>-- <br>Riccardo Corona