gl/memory: allocate the correct memory size

and avoid wasting resources we will never need

https://bugzilla.gnome.org/show_bug.cgi?id=730703
This commit is contained in:
Matthew Waters 2014-05-25 11:44:57 +10:00
parent a7866aa9e5
commit dbffcffaee

View 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);