mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-10 03:19:40 +00:00
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:
parent
49291bc927
commit
4717b48a03
1 changed files with 6 additions and 2 deletions
|
@ -743,8 +743,12 @@ _gl_mem_pbo_alloc (GstGLBaseMemoryAllocator * allocator,
|
|||
}
|
||||
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->pbo,
|
||||
GST_GL_BASE_MEMORY_TRANSFER_NEED_UPLOAD);
|
||||
if (mem->pbo) {
|
||||
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;
|
||||
|
|
Loading…
Reference in a new issue