diff --git a/gst-libs/gst/gl/egl/gstglmemoryegl.c b/gst-libs/gst/gl/egl/gstglmemoryegl.c index 6f04d252e9..15008c13e8 100644 --- a/gst-libs/gst/gl/egl/gstglmemoryegl.c +++ b/gst-libs/gst/gl/egl/gstglmemoryegl.c @@ -251,6 +251,10 @@ gst_gl_memory_egl_init_once (void) _gl_memory_egl_allocator = g_object_new (GST_TYPE_GL_MEMORY_EGL_ALLOCATOR, NULL); + /* The allocator is never unreffed */ + GST_OBJECT_FLAG_SET (_gl_memory_egl_allocator, + GST_OBJECT_FLAG_MAY_BE_LEAKED); + gst_allocator_register (GST_GL_MEMORY_EGL_ALLOCATOR_NAME, gst_object_ref (_gl_memory_egl_allocator)); g_once_init_leave (&_init, 1); diff --git a/gst-libs/gst/gl/gstglbuffer.c b/gst-libs/gst/gl/gstglbuffer.c index 2abdd6d77a..d50fd6d0b9 100644 --- a/gst-libs/gst/gl/gstglbuffer.c +++ b/gst-libs/gst/gl/gstglbuffer.c @@ -456,6 +456,9 @@ gst_gl_buffer_init_once (void) _gl_buffer_allocator = g_object_new (gst_gl_buffer_allocator_get_type (), NULL); + /* The allocator is never unreffed */ + GST_OBJECT_FLAG_SET (_gl_buffer_allocator, GST_OBJECT_FLAG_MAY_BE_LEAKED); + gst_allocator_register (GST_GL_BUFFER_ALLOCATOR_NAME, gst_object_ref (_gl_buffer_allocator)); g_once_init_leave (&_init, 1); diff --git a/gst-libs/gst/gl/gstglmemorypbo.c b/gst-libs/gst/gl/gstglmemorypbo.c index f959dce080..30b9ecb465 100644 --- a/gst-libs/gst/gl/gstglmemorypbo.c +++ b/gst-libs/gst/gl/gstglmemorypbo.c @@ -864,6 +864,8 @@ gst_gl_memory_pbo_init_once (void) GST_DEBUG_CATEGORY_INIT (GST_CAT_GL_MEMORY, "glmemory", 0, "OpenGL Memory"); _gl_allocator = g_object_new (GST_TYPE_GL_MEMORY_PBO_ALLOCATOR, NULL); + /* The allocator is never unreffed */ + GST_OBJECT_FLAG_SET (_gl_allocator, GST_OBJECT_FLAG_MAY_BE_LEAKED); gst_allocator_register (GST_GL_MEMORY_PBO_ALLOCATOR_NAME, gst_object_ref (_gl_allocator)); diff --git a/gst-libs/gst/video/gstvideoaggregator.c b/gst-libs/gst/video/gstvideoaggregator.c index 28b2283557..9046252958 100644 --- a/gst-libs/gst/video/gstvideoaggregator.c +++ b/gst-libs/gst/video/gstvideoaggregator.c @@ -2230,6 +2230,10 @@ gst_video_aggregator_init (GstVideoAggregator * vagg, g_mutex_lock (&sink_caps_mutex); if (klass->sink_non_alpha_caps == NULL) { klass->sink_non_alpha_caps = _get_non_alpha_caps_from_template (klass); + + /* The caps is cached */ + GST_MINI_OBJECT_FLAG_SET (klass->sink_non_alpha_caps, + GST_MINI_OBJECT_FLAG_MAY_BE_LEAKED); } g_mutex_unlock (&sink_caps_mutex);