After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 792543 - rtpbin: fix leak of elements requested by signals
rtpbin: fix leak of elements requested by signals
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
unspecified
Other All
: Normal normal
: 1.13.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-01-15 17:57 UTC by Mathieu Duponchelle
Modified: 2018-01-18 14:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
rtpbin: fix leak of elements requested by signals (2.19 KB, patch)
2018-01-15 17:57 UTC, Mathieu Duponchelle
committed Details | Review

Description Mathieu Duponchelle 2018-01-15 17:57:33 UTC
When the signal returns a floating reference, as its return type
is transfer full, we need to sink it ourselves before passing
it to gst_bin_add (which is transfer floating).

This allows us to unref it in bin_remove_element later on, and
thus to also release the reference we now own if the signal
returns a non-floating reference as well.

As we now still hold a reference to the element when removing it,
we also need to lock its state and setting it to NULL before
unreffing it
Comment 1 Mathieu Duponchelle 2018-01-15 17:57:37 UTC
Created attachment 366857 [details] [review]
rtpbin: fix leak of elements requested by signals
Comment 2 Sebastian Dröge (slomo) 2018-01-15 18:57:38 UTC
Same fix needed for all the GL elements that have a create-element signal
Comment 3 Sebastian Dröge (slomo) 2018-01-17 10:25:27 UTC
(In reply to Sebastian Dröge (slomo) from comment #2)
> Same fix needed for all the GL elements that have a create-element signal

See https://bugzilla.gnome.org/show_bug.cgi?id=792597
Comment 4 Mathieu Duponchelle 2018-01-18 14:28:56 UTC
Attachment 366857 [details] pushed as 03dc229 - rtpbin: fix leak of elements requested by signals