gst: Clear floating flag in constructor of all GstObject subclasses that are not...
[platform/upstream/gstreamer.git] / gst / gstbufferpool.c
index 9529208..3d91236 100644 (file)
@@ -212,7 +212,7 @@ gst_buffer_pool_finalize (GObject * object)
  *
  * Creates a new #GstBufferPool instance.
  *
- * Returns: (transfer floating): a new #GstBufferPool instance
+ * Returns: (transfer full): a new #GstBufferPool instance
  */
 GstBufferPool *
 gst_buffer_pool_new (void)
@@ -222,6 +222,9 @@ gst_buffer_pool_new (void)
   result = g_object_new (GST_TYPE_BUFFER_POOL, NULL);
   GST_DEBUG_OBJECT (result, "created new buffer pool");
 
+  /* Clear floating flag */
+  gst_object_ref_sink (result);
+
   return result;
 }