[Webkit-unassigned] [Bug 185657] [GStreamer]: Do not steal GstStreamCollection's reference to GstStream

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue May 15 14:29:43 PDT 2018


Thibault Saunier <tsaunier at gnome.org> changed:

           What    |Removed                     |Added
 Attachment #340434|                            |review?, commit-queue?
              Flags|                            |

--- Comment #1 from Thibault Saunier <tsaunier at gnome.org> ---
Created attachment 340434

  --> https://bugs.webkit.org/attachment.cgi?id=340434&action=review

[GStreamer]: Do not steal GstStreamCollection's reference to GstStream

Before GStreamer 1.14[1] GstStream's reference was not sunk when creating
it, meaning that when we were using

    `GRefPtr<GstStream> stream = gst_stream_collection_get(collection, stream_index);`

we were actually calling `g_object_sink_ref(some_stream);` leading to taking
ownership of that (floating) reference, while we were not actually owning it as it was
owned by the GstStreamCollection itself. In the end we were ending up
unrefing an already destroyed object randomly later on (see bug #184581)

This patchs makes sure the floating reference is sunk (giving real ownership
to the GstStreamCollection in the end) for Gst < 1.14.

Starting from 1.14, the ref is sunk in gst_stream_new and we will not do anything
as we do not need to anymore.

[1] commit f119e93b47efb06ffc68c01d3e094d5346c30041 `gst: Clear floating flag in constructor of all GstObject subclasses that are not owned by any parent`

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180515/8b542ae5/attachment.html>

More information about the webkit-unassigned mailing list