libgstapp ownership

Sebastian Dröge sebastian at centricular.com
Mon Oct 20 14:06:33 PDT 2014


On Mo, 2014-10-20 at 21:51 +0100, Chris Tapp wrote:
> 
> >> This is correct in this particular context.
> 
> Except this is causing a memory leak where as the above doesn't. Does it make a difference that the samples are taken using "last-sample" from one pipeline and the appsrc is in another?

You have to unref the sample after usage as the last-sample property
will give you a new reference. If you unref the buffer as in your first
example, the buffer will be freed but the sample will still be leaked.



More information about the gstreamer-devel mailing list