From: Matthew Waters Date: Thu, 14 May 2015 04:56:30 +0000 (+1000) Subject: gleffects: only try the GL2 shader init path if we have a GL2 context X-Git-Tag: 1.19.3~511^2~1989^2~877 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6c9f648462ab0c9d34fdb680800240571c1351b8;p=platform%2Fupstream%2Fgstreamer.git gleffects: only try the GL2 shader init path if we have a GL2 context --- diff --git a/ext/gl/gstgleffects.c b/ext/gl/gstgleffects.c index 02878d2..485456f 100644 --- a/ext/gl/gstgleffects.c +++ b/ext/gl/gstgleffects.c @@ -556,13 +556,15 @@ gst_gl_effects_get_fragment_shader (GstGLEffects * effects, } } #if GST_GL_HAVE_OPENGL - if (!gst_gl_shader_compile_and_check (shader, - shader_source_opengl, GST_GL_SHADER_FRAGMENT_SOURCE)) { - gst_gl_context_set_error (context, "Failed to initialize %s shader", - shader_name); - GST_ELEMENT_ERROR (effects, RESOURCE, NOT_FOUND, ("%s", - gst_gl_context_get_error ()), (NULL)); - return NULL; + if (USING_OPENGL (context)) { + if (!gst_gl_shader_compile_and_check (shader, + shader_source_opengl, GST_GL_SHADER_FRAGMENT_SOURCE)) { + gst_gl_context_set_error (context, "Failed to initialize %s shader", + shader_name); + GST_ELEMENT_ERROR (effects, RESOURCE, NOT_FOUND, ("%s", + gst_gl_context_get_error ()), (NULL)); + return NULL; + } } #endif }