From 1b3b3677cc637f404548d6412c617b16ac1fe0c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 20 Mar 2018 16:16:19 +0200 Subject: [PATCH] shmsink: Fix compilation with latest GLib MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit g_object_ref() forwards its arguments type. gstshmsink.c: In function ‘gst_shm_sink_allocator_alloc_locked’: /usr/include/glib-2.0/gobject/gobject.h:512:32: error: passing argument 3 of ‘gst_memory_init’ from incompatible pointer type [-Werror=incompatible-pointer-types] #define g_object_ref(Obj) ((__typeof__(Obj)) (g_object_ref) (Obj)) ^ gstshmsink.c:292:45: note: in expansion of macro ‘g_object_ref’ gst_memory_init (memory, params->flags, g_object_ref (self), NULL, ^~~~~~~~~~~~ --- sys/shm/gstshmsink.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/shm/gstshmsink.c b/sys/shm/gstshmsink.c index 5c68997f16..56374939ff 100644 --- a/sys/shm/gstshmsink.c +++ b/sys/shm/gstshmsink.c @@ -289,8 +289,9 @@ gst_shm_sink_allocator_alloc_locked (GstShmSinkAllocator * self, gsize size, if (padding && (params->flags & GST_MEMORY_FLAG_ZERO_PADDED)) memset (mymem->data + params->prefix + size, 0, padding); - gst_memory_init (memory, params->flags, g_object_ref (self), NULL, - maxsize, align, params->prefix, size); + gst_memory_init (memory, params->flags, + GST_ALLOCATOR_CAST (g_object_ref (self)), NULL, maxsize, align, + params->prefix, size); } return memory;