[Bug 766455] New: nlecomposition: ensure elements pending to be added are not leaked

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Sat May 14 21:15:19 UTC 2016


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

            Bug ID: 766455
           Summary: nlecomposition: ensure elements pending to be added
                    are not leaked
    Classification: Platform
           Product: GStreamer
           Version: git master
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: gst-editing-services
          Assignee: gstreamer-bugs at lists.freedesktop.org
          Reporter: aurelien.zanelli at parrot.com
        QA Contact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---

Currently, when nlecomposition object is finalized with pending elements to be
added in bin (in action or in pending_io), these elements are not unreffed and
so they are leaked since from user point of view references are given during
gst_bin_add.

This can easily happen if the state of the nlecomposition element is in NULL
state: action processing task is not running; or if changes have not been
committed.

Below is two snippets of code used to check leaks with GST_TRACE

/* test case with pending actions */
GstElement *bin = gst_element_factory_make ("nlecomposition", NULL);
GstElement *operation = gst_element_factory_make ("nleoperation", NULL);
gst_bin_add (GST_BIN (bin), operation);
gst_object_unref (bin);

/* test case with pending io, ie not committed */
GstElement *bin = gst_element_factory_make ("nlecomposition", NULL);
GstElement *operation = gst_element_factory_make ("nleoperation", NULL);
gst_bin_add (GST_BIN (bin), operation);
gst_element_set_state (bin, GST_STATE_READY);
g_usleep (1 * G_USEC_PER_SEC);
gst_element_set_state (bin, GST_STATE_NULL);
gst_object_unref (bin);

-- 
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