[Bug 756552] playbin: Leaking sinks when repeating state changes from NULL->PLAYING in a loop

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Wed Oct 14 18:09:56 PDT 2015


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

Vineeth <vineeth.tm at samsung.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |vineeth.tm at samsung.com

--- Comment #4 from Vineeth <vineeth.tm at samsung.com> ---
Created attachment 313349
  --> https://bugzilla.gnome.org/attachment.cgi?id=313349&action=edit
fix element leak

As mentioned by Christoph Reiter, the issue seems to be happening because of
commit f99a24f8b3ab1d0fa0cc56432b766a5c1ae85fb4

The problem here is
previously
elem =
      gst_play_sink_find_property_sinks (playsink, chain->sink, "volume",
      G_TYPE_DOUBLE);
this is a transfer none function and need not be freed explicitly.

After the change, we are using 
  if (GST_IS_BIN (chain->sink))
    elem =
        gst_bin_get_by_interface (GST_BIN_CAST (chain->sink),
        GST_TYPE_STREAM_VOLUME);
  else if (GST_IS_STREAM_VOLUME (chain->sink))
    elem = gst_object_ref (chain->sink);
  else
    elem = NULL;
where gst_bin_get_by_interface is also transfer FULL. So we are getting the
reference of the volume element.

And the same is being simply set to NULL before freeing. resulting in leaks.


PS: hope i did not hijack this issue from Christoph :)

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