mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-10 11:29:55 +00:00
429353337d
The URI downloader is creating the source element with gst_element_factory_make() that returns a floating reference that nobody is consuming. This is causing problems in WebKit, where the smart pointers used to take references of the source elment get confused and end up consuming the floating reference and then releasing the element, which usually crashes because the URI downloader still tries to use its src element. See https://bugs.webkit.org/show_bug.cgi?id=144040. This commit adds two helper functions to ensure and destroy the source element, to make the code simpler and less error prone. The ensure method takes care of checking if we can reuse the existing one or we need to create a new one, taking always its ownership. The destroy method simply avoids duplicated code to set the source to NULL state and then unref it. https://bugzilla.gnome.org/show_bug.cgi?id=766053 |
||
---|---|---|
.. | ||
gst | ||
Makefile.am |