Commit 07f459ca authored by He Junyan's avatar He Junyan

libs: dmabuf: init the GST_CAT_DEFAULT in type define.

To avoid `gst_debug_log_valist: assertion 'category != NULL' failed`
if we do not call gst_dmabuf_allocator_new
parent 9a55945c
......@@ -42,7 +42,12 @@
#define GST_CAT_DEFAULT dmabuf_debug
G_DEFINE_TYPE (GstDmaBufAllocator, gst_dmabuf_allocator, GST_TYPE_FD_ALLOCATOR);
#define _do_init \
GST_DEBUG_CATEGORY_INIT (dmabuf_debug, \
"dmabuf", 0, "dmabuf memory");
G_DEFINE_TYPE_WITH_CODE (GstDmaBufAllocator, gst_dmabuf_allocator,
static gpointer
gst_dmabuf_mem_map (GstMemory * gmem, GstMapInfo * info, gsize maxsize)
......@@ -127,8 +132,6 @@ gst_dmabuf_allocator_new (void)
GstAllocator *alloc;
GST_DEBUG_CATEGORY_INIT (dmabuf_debug, "dmabuf", 0, "dmabuf memory");
alloc = g_object_new (GST_TYPE_DMABUF_ALLOCATOR, NULL);
gst_object_ref_sink (alloc);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment