mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 11:11:08 +00:00
ximage, xvimage: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
This commit is contained in:
parent
8d7eb2eb4f
commit
fd43b3d604
3 changed files with 13 additions and 13 deletions
|
@ -116,7 +116,7 @@ beach:
|
|||
gst_object_unref (mem->sink);
|
||||
|
||||
sub_mem:
|
||||
g_slice_free (GstXImageMemory, mem);
|
||||
g_free (mem);
|
||||
}
|
||||
|
||||
static gpointer
|
||||
|
@ -151,7 +151,7 @@ ximage_memory_share (GstXImageMemory * mem, gssize offset, gsize size)
|
|||
size = mem->parent.size - offset;
|
||||
|
||||
/* the shared memory is always readonly */
|
||||
sub = g_slice_new (GstXImageMemory);
|
||||
sub = g_new (GstXImageMemory, 1);
|
||||
|
||||
gst_memory_init (GST_MEMORY_CAST (sub), GST_MINI_OBJECT_FLAGS (parent) |
|
||||
GST_MINI_OBJECT_FLAG_LOCK_READONLY, mem->parent.allocator,
|
||||
|
@ -222,7 +222,7 @@ ximage_memory_alloc (GstXImageBufferPool * xpool)
|
|||
width = xpool->padded_width;
|
||||
height = xpool->padded_height;
|
||||
|
||||
mem = g_slice_new (GstXImageMemory);
|
||||
mem = g_new (GstXImageMemory, 1);
|
||||
|
||||
#ifdef HAVE_XSHM
|
||||
mem->SHMInfo.shmaddr = ((void *) -1);
|
||||
|
@ -360,7 +360,7 @@ ximage_memory_alloc (GstXImageBufferPool * xpool)
|
|||
|
||||
beach:
|
||||
if (!success) {
|
||||
g_slice_free (GstXImageMemory, mem);
|
||||
g_free (mem);
|
||||
mem = NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -630,7 +630,7 @@ gst_xvcontext_free (GstXvContext * context)
|
|||
|
||||
g_mutex_clear (&context->lock);
|
||||
|
||||
g_slice_free1 (sizeof (GstXvContext), context);
|
||||
g_free (context);
|
||||
}
|
||||
|
||||
|
||||
|
@ -659,7 +659,7 @@ gst_xvcontext_new (GstXvContextConfig * config, GError ** error)
|
|||
|
||||
g_return_val_if_fail (config != NULL, NULL);
|
||||
|
||||
context = g_slice_new0 (GstXvContext);
|
||||
context = g_new0 (GstXvContext, 1);
|
||||
|
||||
gst_mini_object_init (GST_MINI_OBJECT_CAST (context), 0,
|
||||
gst_xvcontext_get_type (),
|
||||
|
@ -989,7 +989,7 @@ gst_xvcontext_create_xwindow (GstXvContext * context, gint width, gint height)
|
|||
|
||||
g_return_val_if_fail (GST_IS_XVCONTEXT (context), NULL);
|
||||
|
||||
window = g_slice_new0 (GstXWindow);
|
||||
window = g_new0 (GstXWindow, 1);
|
||||
|
||||
window->context = gst_xvcontext_ref (context);
|
||||
window->render_rect.x = window->render_rect.y = 0;
|
||||
|
@ -1064,7 +1064,7 @@ gst_xvcontext_create_xwindow_from_xid (GstXvContext * context, XID xid)
|
|||
GstXWindow *window;
|
||||
XWindowAttributes attr;
|
||||
|
||||
window = g_slice_new0 (GstXWindow);
|
||||
window = g_new0 (GstXWindow, 1);
|
||||
window->win = xid;
|
||||
window->context = gst_xvcontext_ref (context);
|
||||
|
||||
|
@ -1124,7 +1124,7 @@ gst_xwindow_destroy (GstXWindow * window)
|
|||
|
||||
gst_xvcontext_unref (context);
|
||||
|
||||
g_slice_free1 (sizeof (GstXWindow), window);
|
||||
g_free (window);
|
||||
}
|
||||
|
||||
#ifdef HAVE_XI2
|
||||
|
|
|
@ -185,7 +185,7 @@ gst_xvimage_allocator_free (GstAllocator * allocator, GstMemory * gmem)
|
|||
g_mutex_unlock (&context->lock);
|
||||
|
||||
sub_mem:
|
||||
g_slice_free (GstXvImageMemory, mem);
|
||||
g_free (mem);
|
||||
}
|
||||
|
||||
static gpointer
|
||||
|
@ -223,7 +223,7 @@ gst_xvimage_memory_share (GstXvImageMemory * mem, gssize offset, gsize size)
|
|||
size = mem->parent.size - offset;
|
||||
|
||||
/* the shared memory is always readonly */
|
||||
sub = g_slice_new (GstXvImageMemory);
|
||||
sub = g_new (GstXvImageMemory, 1);
|
||||
|
||||
gst_memory_init (GST_MEMORY_CAST (sub), GST_MINI_OBJECT_FLAGS (parent) |
|
||||
GST_MINI_OBJECT_FLAG_LOCK_READONLY, mem->parent.allocator,
|
||||
|
@ -357,7 +357,7 @@ gst_xvimage_allocator_alloc (GstXvImageAllocator * allocator, gint im_format,
|
|||
|
||||
context = allocator->context;
|
||||
|
||||
mem = g_slice_new (GstXvImageMemory);
|
||||
mem = g_new (GstXvImageMemory, 1);
|
||||
|
||||
mem->im_format = im_format;
|
||||
mem->info = *info;
|
||||
|
@ -531,7 +531,7 @@ gst_xvimage_allocator_alloc (GstXvImageAllocator * allocator, gint im_format,
|
|||
|
||||
beach:
|
||||
if (!success) {
|
||||
g_slice_free (GstXvImageMemory, mem);
|
||||
g_free (mem);
|
||||
mem = NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue