Closed MaZderMind closed 4 years ago
Does it also fix your GC issue? This should stop the request pad being collected while it's referenced by the ghost pad, but might be other issue at play there too.
@neilcsmith-net It also fixes the Memory-Leak, if that is what you relate to. I still have a very rare reliability issue in my Code but I do not yet see a relation to this or #184.
@MaZderMind I'm thinking of the issue with the (request) Pad being GC'd while the callback is running. This might fix that. All owned Java GObjects are cached if there are additional native references (as that GhostPad should have).
@neilcsmith-net Ah - yes! That seems to be fixed as well \o/ Didn't even notice that because I was experimenting with the original fix applied locally for a while. Thank you very much for your help!
@MaZderMind :+1: we might still want to look at caching the pads in the element, but that's good to know.
adding
@CallerOwnsReturn
togst_element_get_request_pad
as suggested in https://github.com/gstreamer-java/gst1-java-core/pull/186#discussion_r406777371 seems to reliably fix #188.