From: Matthew Waters Date: Wed, 30 Dec 2015 01:11:09 +0000 (+1100) Subject: glmemorypbo: only create a pbo memory if the context actually supports it X-Git-Tag: 1.19.3~507^2~7317 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=49291bc927bfb5259857413dae4d205262f6e210;p=platform%2Fupstream%2Fgstreamer.git 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. --- diff --git a/gst-libs/gst/gl/gstglmemorypbo.c b/gst-libs/gst/gl/gstglmemorypbo.c index 8318212d6f..15e9110c9b 100644 --- a/gst-libs/gst/gl/gstglmemorypbo.c +++ b/gst-libs/gst/gl/gstglmemorypbo.c @@ -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;