mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-10 03:19:40 +00:00
glmemorypbo: only create a pbo memory if the context actually supports it
e.g. GL <= 2.0 does not support pbo usage and GL 2.1 only supports pbo upload.
This commit is contained in:
parent
6917b3b35a
commit
49291bc927
1 changed files with 2 additions and 2 deletions
|
@ -239,8 +239,8 @@ _gl_mem_create (GstGLMemoryPBO * gl_mem, GError ** error)
|
|||
if (!alloc_class->create ((GstGLBaseMemory *) gl_mem, error))
|
||||
return FALSE;
|
||||
|
||||
if (USING_OPENGL (context) || USING_OPENGL3 (context)
|
||||
|| USING_GLES3 (context)) {
|
||||
if (CONTEXT_SUPPORTS_PBO_DOWNLOAD (context)
|
||||
|| CONTEXT_SUPPORTS_PBO_UPLOAD (context)) {
|
||||
GstAllocationParams alloc_params =
|
||||
{ 0, GST_MEMORY_CAST (gl_mem)->align, 0, 0 };
|
||||
GstGLBaseMemoryAllocator *buf_allocator;
|
||||
|
|
Loading…
Reference in a new issue