glcolorconvert: Only use GL_TEXTURE_RECTANGLE with OpenGL
authorSebastian Dröge <sebastian@centricular.com>
Thu, 29 Jan 2015 15:26:26 +0000 (16:26 +0100)
committerTim-Philipp Müller <tim@centricular.com>
Sat, 9 Dec 2017 19:31:53 +0000 (19:31 +0000)
It's not defined for GLES.

gst-libs/gst/gl/gstglcolorconvert.c

index 51477dd..50592ae 100644 (file)
@@ -837,11 +837,14 @@ _YUV_to_RGB (GstGLColorConvert * convert)
       "GL_APPLE_ycbcr_422");
   gboolean in_tex_rectangular = FALSE;
 
+#if GST_GL_HAVE_OPENGL
   GstMemory *memory = gst_buffer_peek_memory (convert->inbuf, 0);
-  if (gst_is_gl_memory (memory)) {
+  if (gst_is_gl_memory (memory) && (USING_OPENGL (convert->context)
+          || USING_OPENGL3 (convert->context))) {
     in_tex_rectangular =
         ((GstGLMemory *) memory)->tex_target == GL_TEXTURE_RECTANGLE;
   }
+#endif
 
   info->out_n_textures = 1;