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&#39;s a large mem leak.
<br>Here&#39;s the way I fill the buffer:<br><br><br><br>static void cb_handoff (GstElement *fakesrc,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; GstBuffer&nbsp; *buffer,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; GstPad&nbsp;&nbsp;&nbsp;&nbsp; *pad,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; gpointer&nbsp;&nbsp;&nbsp; user_data)<br>{<br><br>.....//image contain compressed data and usefull info...
<br><br>GST_BUFFER_MALLOCDATA(buffer) =&nbsp;&nbsp;&nbsp; (unsigned char*) g_memdup (image-&gt;pixel_ptr,image-&gt;dimension);<br>&nbsp;GST_BUFFER_DATA(buffer) = GST_BUFFER_MALLOCDATA(buffer);<br>&nbsp;GST_BUFFER_SIZE(buffer) = image-&gt;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&#39;s.<br><br>-- <br>Riccardo Corona