gst: Clear floating flag in constructor of all GstObject subclasses that are not...
[platform/upstream/gstreamer.git] / gst / gststreamcollection.c
index c1d4674..ef134b9 100644 (file)
@@ -184,15 +184,23 @@ gst_stream_collection_finalize (GObject * object)
  *
  * Create a new #GstStreamCollection.
  *
- * Returns: (transfer floating): The new #GstStreamCollection.
+ * Returns: (transfer full): The new #GstStreamCollection.
  *
  * Since: 1.10
  */
 GstStreamCollection *
 gst_stream_collection_new (const gchar * upstream_id)
 {
-  return g_object_new (GST_TYPE_STREAM_COLLECTION, "upstream-id", upstream_id,
+  GstStreamCollection *collection;
+
+  collection =
+      g_object_new (GST_TYPE_STREAM_COLLECTION, "upstream-id", upstream_id,
       NULL);
+
+  /* Clear floating flag */
+  g_object_ref_sink (collection);
+
+  return collection;
 }
 
 static void