gl/memory: allocate the correct memory size
authorMatthew Waters <ystreet00@gmail.com>
Sun, 25 May 2014 01:44:57 +0000 (11:44 +1000)
committerTim-Philipp Müller <tim@centricular.com>
Sat, 9 Dec 2017 19:31:41 +0000 (19:31 +0000)
and avoid wasting resources we will never need

https://bugzilla.gnome.org/show_bug.cgi?id=730703

gst-libs/gst/gl/gstglmemory.c

index 90e73a2..4bfc6db 100644 (file)
@@ -563,7 +563,7 @@ _gl_mem_init (GstGLMemory * mem, GstAllocator * allocator, GstMemory * parent,
 {
   gsize maxsize;
 
-  maxsize = _gl_texture_type_n_bytes (tex_type) * stride * height;
+  maxsize = stride * height;
 
   gst_memory_init (GST_MEMORY_CAST (mem), GST_MEMORY_FLAG_NO_SHARE,
       allocator, parent, maxsize, 0, 0, maxsize);