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:
Matthew Waters 2015-12-30 12:11:09 +11:00
parent 6917b3b35a
commit 49291bc927

View file

@ -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;