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 792597 - GL: fix leak of elements requested by signals
GL: fix leak of elements requested by signals
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
unspecified
Other All
: Normal normal
: 1.13.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-01-17 10:25 UTC by Sebastian Dröge (slomo)
Modified: 2018-02-09 06:19 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sebastian Dröge (slomo) 2018-01-17 10:25:16 UTC
+++ This bug was initially created as a clone of Bug #792543 +++

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


This relates to all the "create-element" signals that various GL elements have.
Comment 1 Matthew Waters (ystreet00) 2018-02-09 06:19:26 UTC
commit fbef9220d3dc2f785081c4766901aab2ecfaed10
Author: Matthew Waters <matthew@centricular.com>
Date:   Fri Feb 9 17:15:30 2018 +1100

    gl*bin: fix transfer semantics for the create-element signal
    
    We can either receive an element that is floating or not and need to
    accomodate that in the signal return values.  Do so by removing the
    floating flag.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=792597