From fe216ac6b2496b533c2500c7265fc1194f506271 Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Sun, 8 Jul 2012 01:09:56 +1000 Subject: [PATCH] [521/906] GstGLMemory: update for GstAllocator changes --- gst-libs/gst/gl/gstglmemory.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gst-libs/gst/gl/gstglmemory.c b/gst-libs/gst/gl/gstglmemory.c index ea7d7b2..4016827 100644 --- a/gst-libs/gst/gl/gstglmemory.c +++ b/gst-libs/gst/gl/gstglmemory.c @@ -266,9 +266,11 @@ _gl_mem_is_span_func (GstGLMemory * mem1, GstGLMemory * mem2, gsize * offset) } static void -_gl_mem_destroy_notify (gpointer user_data) +_gl_mem_destroy_free (GstMiniObject * allocator) { GST_LOG ("GLTexture memory allocator freed"); + + g_slice_free (GstAllocator, (GstAllocator *) allocator); } /** @@ -312,9 +314,12 @@ gst_gl_memory_init (void) }; if (g_once_init_enter (&_init)) { - _gl_allocator = gst_allocator_new (&mem_info, NULL, _gl_mem_destroy_notify); + _gl_allocator = g_slice_new (GstAllocator); + gst_allocator_init (_gl_allocator, GST_ALLOCATOR_FLAG_CUSTOM_ALLOC, + &mem_info, _gl_mem_destroy_free); gst_allocator_register (GST_GL_MEMORY_ALLOCATOR, gst_allocator_ref (_gl_allocator)); + g_once_init_leave (&_init, 1); } } -- 2.7.4