[Bug 797157] New: glsinkbin: Leak if sink is not sink-ref'd in a specific order

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Mon Sep 17 10:04:31 UTC 2018


https://bugzilla.gnome.org/show_bug.cgi?id=797157

            Bug ID: 797157
           Summary: glsinkbin: Leak if sink is not sink-ref'd in a
                    specific order
    Classification: Platform
           Product: GStreamer
           Version: 1.14.x
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: gst-plugins-good
          Assignee: gstreamer-bugs at lists.freedesktop.org
          Reporter: crg7475 at mailbox.org
        QA Contact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---

I've observed that if I sink-ref the sink I pass to glsinkbin, I have to do
that in a specific order, otherwise I get GLib errors about unref'ing a
discarded object.

If I do it like this, it is fine:

    g_object_set(glsinkbin, "sink", my_glsink, NULL);
    gst_object_ref_sink(my_glsink);
    [...]
    gst_object_unref(my_sink);

If I do it like this, errors occur:

    gst_object_ref_sink(my_glsink);
    g_object_set(glsinkbin, "sink", my_glsink, NULL);
    [...]
    gst_object_unref(my_sink);

It is my understanding that this should not be order dependent - at least
nothing in the GLib or glsinkbin documentation hints at that. So it looks like
a design flaw to me.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list