Lifetime of GstBuffer pushed to appsrc

Alexey Chernov 4ernov at gmail.com
Sun Mar 3 12:09:38 PST 2013


Hello,

it keeps a little bit unclear to me what is the lifetime of a GstBuffer that 
has been pushed to appsrc with, for example, gst_app_src_push_buffer(). The 
documentation states only that "This function takes ownership of the buffer".

Is it safe to free the buffer after gst_app_src_push_buffer() returns? If not, 
is there any way to take control of buffer data that is not malloc_data? It's 
usually very convenient not to memcpy data from outside to malloc_data of 
GstBuffer and just use it, but it's not clear how to free them when they are 
not needed anymore to prevent leaks.


More information about the gstreamer-devel mailing list