unref an element without memory leak

Nicolas Dufresne nicolas at ndufresne.ca
Mon Oct 16 21:40:18 UTC 2017


Le 16 oct. 2017 3:09 PM, "Liu Xin" <liuxin8166 at hotmail.com> a écrit :

hi,


I'm writing a pipeline with dynamic branch. While removing the branch, I
ran into the case in which a queue element will be gst_bin_removed in the
probe callback to the queue's peering tee element. My question is, what if
there's frame data still hanging in the queue element? Will this lead to a
memory leak?


It's a requirement to set the element to NULL state before you unref it.
The buffers will be discarded and returned to their appropriate pool and/or
allocator during this state transition.


Please share your expertise.


Thanks,

Xin

_______________________________________________
gstreamer-devel mailing list
gstreamer-devel at lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20171016/6325ff1a/attachment.html>


More information about the gstreamer-devel mailing list