GstBufferPool *pool = NULL;
GstStructure *structure;
gsize size = sink->video_info.size;
+ GstAllocator *alloc;
pool = g_object_new (gst_wayland_pool_get_type (), NULL);
structure = gst_buffer_pool_get_config (pool);
gst_buffer_pool_config_set_params (structure, caps, size, 2, 0);
- gst_buffer_pool_config_set_allocator (structure, gst_wl_shm_allocator_get (),
- NULL);
+ alloc = gst_wl_shm_allocator_get ();
+ gst_buffer_pool_config_set_allocator (structure, alloc, NULL);
if (!gst_buffer_pool_set_config (pool, structure)) {
g_object_unref (pool);
pool = NULL;
}
+ g_object_unref (alloc);
return pool;
}
GstCaps *caps;
GstBufferPool *pool = NULL;
gboolean need_pool;
+ GstAllocator *alloc;
gst_query_parse_allocation (query, &caps, &need_pool);
if (pool)
g_object_unref (pool);
+ alloc = gst_wl_shm_allocator_get ();
gst_query_add_allocation_param (query, gst_wl_shm_allocator_get (), NULL);
gst_query_add_allocation_meta (query, GST_VIDEO_META_API_TYPE, NULL);
+ g_object_unref (alloc);
return TRUE;
}
GstBuffer *buf;
struct wl_buffer *wlbuf;
GstWlBuffer *gwlbuf;
+ GstAllocator *alloc;
if (window->no_border_update)
return;
/* draw the area_subsurface */
gst_video_info_set_format (&info, format, width, height);
- buf = gst_buffer_new_allocate (gst_wl_shm_allocator_get (), info.size, NULL);
+ alloc = gst_wl_shm_allocator_get ();
+
+ buf = gst_buffer_new_allocate (alloc, info.size, NULL);
gst_buffer_memset (buf, 0, 0, info.size);
wlbuf =
gst_wl_shm_memory_construct_wl_buffer (gst_buffer_peek_memory (buf, 0),
/* at this point, the GstWlBuffer keeps the buffer
* alive and will free it on wl_buffer::release */
gst_buffer_unref (buf);
+ g_object_unref (alloc);
}
void