Request pads leaking if present when element disposed

Thiago Sousa Santos thiagossantos at gmail.com
Sat Jan 21 18:53:51 UTC 2017


On Fri, Jan 20, 2017 at 10:59 PM, Brendan Shanks <brendan.shanks at teradek.com
> wrote:

> Hi, I'm writing an element that subclasses GstBin, and returns request
> ghost pads targeting elements inside the bin.
> I noticed that GstGhostPads and GstProxyPads are leaking if they're
> present in the element when it gets disposed/finalized.
>
> I'm unsure of the cause, but one thing I noticed is that the docs for
> gst_element_release_request_pad() say that the call needs to be followed
> by gst_object_unref().
> But in gst_element_dispose(), the element's release_pad() is being called
> without gst_object_unref() afterwards.
>
> Is this an oversight, or is the pad getting an unnecessary ref somewhere
> else?
>

I'd say the second option. If you share the relevants parts of your code we
might help tracking it down.

The element's release_pad() has different requirements than that of
gst_element_release_request_pad(). Usually the element's release_pad will
call gst_element_remove_pad() that unparents the pad, removing the parent's
reference to it.


>
> Thanks,
> Brendan
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>


-- 
Thiago Sousa Santos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20170121/d4a9c7a0/attachment.html>


More information about the gstreamer-devel mailing list