glmemorypbo: fix wrapping data on GL 2.1

GL 2.1 only supports pbo upload.

The wrapped data pointer was only being set on the pbo memory and on the
glmemory so when a download was requested (in GL 2.1), glmemory was
allocating a new data pointer and thus not returning the wrapped data.
This commit is contained in:
Matthew Waters 2015-12-30 12:12:17 +11:00 committed by Tim-Philipp Müller
parent 5aca58ce86
commit 633c26884e

View file

@ -743,8 +743,12 @@ _gl_mem_pbo_alloc (GstGLBaseMemoryAllocator * allocator,
} }
if (alloc_flags & GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_WRAP_SYSMEM) { if (alloc_flags & GST_GL_ALLOCATION_PARAMS_ALLOC_FLAG_WRAP_SYSMEM) {
GST_MINI_OBJECT_FLAG_SET (mem, GST_GL_BASE_MEMORY_TRANSFER_NEED_UPLOAD); GST_MINI_OBJECT_FLAG_SET (mem, GST_GL_BASE_MEMORY_TRANSFER_NEED_UPLOAD);
GST_MINI_OBJECT_FLAG_SET (mem->pbo, if (mem->pbo) {
GST_GL_BASE_MEMORY_TRANSFER_NEED_UPLOAD); GST_MINI_OBJECT_FLAG_SET (mem->pbo,
GST_GL_BASE_MEMORY_TRANSFER_NEED_UPLOAD);
mem->pbo->mem.data = params->parent.wrapped_data;
}
mem->mem.mem.data = params->parent.wrapped_data;
} }
return mem; return mem;