gl/upload/meta: remove unneeded texture deletion
authorMatthew Waters <matthew@centricular.com>
Wed, 15 Jun 2016 04:40:40 +0000 (14:40 +1000)
committerTim-Philipp Müller <tim@centricular.com>
Sat, 9 Dec 2017 19:32:20 +0000 (19:32 +0000)
The textures are managed by the GstGLMemory inside the output buffer.  Freeing
them prematurely may result in a use-after-free.

gst-libs/gst/gl/gstglupload.c

index 87f230c4aaa5268e404048f07254bf2b21e63fb0..b68f7f16de62b419ebb1a1c6364ded957fcc3bcb 100644 (file)
@@ -910,16 +910,9 @@ static void
 _upload_meta_upload_free (gpointer impl)
 {
   struct GLUploadMeta *upload = impl;
-  gint i;
 
   g_return_if_fail (impl != NULL);
 
-  for (i = 0; i < GST_GL_UPLOAD_MAX_PLANES; i++) {
-    if (upload->texture_ids[i])
-      gst_gl_context_del_texture (upload->upload->context,
-          &upload->texture_ids[i]);
-  }
-
   if (upload->params)
     gst_gl_allocation_params_free ((GstGLAllocationParams *) upload->params);