[gst-devel] Re: bufferpools

Ronald Bultje rbultje at ronald.bitfreak.net
Fri Jan 9 05:57:03 CET 2004


On Fri, 2004-01-09 at 14:09, Benjamin Otte wrote:
> This last function is actually wrong, because you never free the DstData
> struct. A correct function would be
> 
> static void
> gst_ximagesink_buffer_free (GstData *data)
> {
>   g_free (GST_BUFFER_DATA (data));
>   GST_BUFFER_DATA (data) = NULL;
>   gst_buffer_default_free (GST_BUFFER (data));
> }

I think the correct behaviour is actually to set GST_BUFFER_DONTFREE as
a flag on your buffer. ;).

> which is why I still mandated adding a buffer_data_free function pointer
> to GstBuffer and make the data_free function of GstBuffer call that one.

Good idea.

Ronald

-- 
Ronald Bultje <rbultje at ronald.bitfreak.net>
Linux Video/Multimedia developer





More information about the gstreamer-devel mailing list