summaryrefslogtreecommitdiff
path: root/ext/wayland
diff options
context:
space:
mode:
Diffstat (limited to 'ext/wayland')
-rw-r--r--ext/wayland/wlshmallocator.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/ext/wayland/wlshmallocator.c b/ext/wayland/wlshmallocator.c
index e1b691b0e..dd334e341 100644
--- a/ext/wayland/wlshmallocator.c
+++ b/ext/wayland/wlshmallocator.c
@@ -110,8 +110,11 @@ gst_wl_shm_allocator_init (GstWlShmAllocator * self)
void
gst_wl_shm_allocator_register (void)
{
- gst_allocator_register (GST_ALLOCATOR_WL_SHM,
- g_object_new (GST_TYPE_WL_SHM_ALLOCATOR, NULL));
+ GstAllocator *alloc;
+
+ alloc = g_object_new (GST_TYPE_WL_SHM_ALLOCATOR, NULL);
+ gst_object_ref_sink (alloc);
+ gst_allocator_register (GST_ALLOCATOR_WL_SHM, alloc);
}
GstAllocator *