mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
glmemory: fix texture leak in _gl_mem_copy
https://bugzilla.gnome.org/show_bug.cgi?id=755456
This commit is contained in:
parent
bcda593f12
commit
04856e6c8a
1 changed files with 2 additions and 2 deletions
|
@ -592,7 +592,7 @@ _gl_mem_create (GstGLMemory * gl_mem, GError ** error)
|
||||||
gst_gl_sized_gl_format_from_gl_format_type (context, tex_format,
|
gst_gl_sized_gl_format_from_gl_format_type (context, tex_format,
|
||||||
tex_type);
|
tex_type);
|
||||||
|
|
||||||
if (!gl_mem->tex_id) {
|
if (!gl_mem->texture_wrapped) {
|
||||||
gl_mem->tex_id =
|
gl_mem->tex_id =
|
||||||
_new_texture (context, gl_mem->tex_target, internal_format, tex_format,
|
_new_texture (context, gl_mem->tex_target, internal_format, tex_format,
|
||||||
tex_type, gl_mem->tex_width, GL_MEM_HEIGHT (gl_mem));
|
tex_type, gl_mem->tex_width, GL_MEM_HEIGHT (gl_mem));
|
||||||
|
@ -1287,12 +1287,12 @@ gst_gl_memory_wrapped_texture (GstGLContext * context,
|
||||||
mem = g_slice_new0 (GstGLMemory);
|
mem = g_slice_new0 (GstGLMemory);
|
||||||
|
|
||||||
mem->tex_id = texture_id;
|
mem->tex_id = texture_id;
|
||||||
|
mem->texture_wrapped = TRUE;
|
||||||
|
|
||||||
_gl_mem_init (mem, _gl_allocator, NULL, context, NULL, info, valign, plane,
|
_gl_mem_init (mem, _gl_allocator, NULL, context, NULL, info, valign, plane,
|
||||||
user_data, notify);
|
user_data, notify);
|
||||||
|
|
||||||
mem->tex_target = texture_target;
|
mem->tex_target = texture_target;
|
||||||
mem->texture_wrapped = TRUE;
|
|
||||||
|
|
||||||
mem = (GstGLMemory *) gst_gl_base_buffer_alloc_data ((GstGLBaseBuffer *) mem);
|
mem = (GstGLMemory *) gst_gl_base_buffer_alloc_data ((GstGLBaseBuffer *) mem);
|
||||||
GST_MINI_OBJECT_FLAG_SET (mem, GST_GL_BASE_BUFFER_FLAG_NEED_DOWNLOAD);
|
GST_MINI_OBJECT_FLAG_SET (mem, GST_GL_BASE_BUFFER_FLAG_NEED_DOWNLOAD);
|
||||||
|
|
Loading…
Reference in a new issue