Revert "element: Enforce that elements created by gst_element_factory_create/make() are floating"

See https://gitlab.freedesktop.org/gstreamer/gstreamer/merge_requests/333

The reference we receive when calling g_object_new should be
floating, but we can't force it at our level.

This reverts commit ce43de8690.
This commit is contained in:
Mathieu Duponchelle 2019-12-05 09:47:38 +01:00
parent 3c21d6a29f
commit 5c47fe6118

View file

@ -386,12 +386,6 @@ gst_element_factory_create (GstElementFactory * factory, const gchar * name)
/* This ref will never be dropped as the class is never destroyed */
GST_OBJECT_FLAG_SET (factory, GST_OBJECT_FLAG_MAY_BE_LEAKED);
/* Ensure that the reference is floating. Bindings might have a hard time
* making sure that the reference is indeed still floating after returning
* here */
if (element)
g_object_force_floating ((GObject *) element);
GST_DEBUG ("created element \"%s\"", GST_OBJECT_NAME (factory));
return element;