questions about appsink

Tim Müller tim at
Fri Oct 23 03:45:33 PDT 2015

On Fri, 2015-10-23 at 01:53 -0700, hugh wrote:


> There's a question about appsink,I use this pipe to
> test:videotestsrc-->caps-->appsink, why the first buffer refcount is
> 1 more
> time than others? Can it leak to memory leak? the result I got just
> as :
> in:appsink probe buf_ref=2
> out:appsink buf_ref=3

It's probably because of GstBaseSink's "last-sample" property. It keeps
a ref to the last buffer around until a new buffer comes in. It should
not leak.

You can disable this by setting the "enable-last-sample" property on
the sink to FALSE.


Tim Müller, Centricular Ltd -

More information about the gstreamer-devel mailing list