shmsink: Fix compilation with latest GLib

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,
                                             ^~~~~~~~~~~~
This commit is contained in:
Sebastian Dröge 2018-03-20 16:16:19 +02:00
parent ce0d902d39
commit 1b3b3677cc

View file

@ -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;