From aea08e86a5ce295318992b93c3eea3f7686b3a4b Mon Sep 17 00:00:00 2001 From: Ramprakash Jelari Date: Mon, 24 Nov 2014 18:40:53 +0530 Subject: [PATCH] glcontext: Fix unused variable warning by moving declaration where it is actually used --- gst-libs/gst/gl/gstglcontext.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gst-libs/gst/gl/gstglcontext.c b/gst-libs/gst/gl/gstglcontext.c index 3970a99893..44ceafb77a 100644 --- a/gst-libs/gst/gl/gstglcontext.c +++ b/gst-libs/gst/gl/gstglcontext.c @@ -494,9 +494,6 @@ gst_gl_context_get_current_gl_api (guint * major, guint * minor) goto next; } else { -#if GST_GL_HAVE_OPENGL - GLuint context_flags = 0; -#endif sscanf (version, "%d.%d", &maj, &min); if (maj <= 0 || min < 0) @@ -504,6 +501,8 @@ gst_gl_context_get_current_gl_api (guint * major, guint * minor) #if GST_GL_HAVE_OPENGL if (GetIntegerv && (maj > 3 || (maj == 3 && min > 1))) { + GLuint context_flags = 0; + ret = GST_GL_API_NONE; GetIntegerv (GL_CONTEXT_PROFILE_MASK, &context_flags); if (context_flags & GL_CONTEXT_CORE_PROFILE_BIT)