allocator: ref_sink() the global sysmem allocator after creation
authorSebastian Dröge <sebastian@centricular.com>
Mon, 15 May 2017 11:34:57 +0000 (14:34 +0300)
committerSebastian Dröge <sebastian@centricular.com>
Wed, 17 May 2017 07:40:37 +0000 (10:40 +0300)
It's not owned by the first one to ask for it, but by this very code.

https://bugzilla.gnome.org/show_bug.cgi?id=743062

gst/gstallocator.c

index fcab8a1..b93c7a3 100644 (file)
@@ -594,6 +594,9 @@ _priv_gst_allocator_initialize (void)
 
   _sysmem_allocator = g_object_new (gst_allocator_sysmem_get_type (), NULL);
 
+  /* Clear floating flag */
+  gst_object_ref_sink (_sysmem_allocator);
+
   gst_allocator_register (GST_ALLOCATOR_SYSMEM,
       gst_object_ref (_sysmem_allocator));