[vlc-commits] opengl: fix unused variable

Romain Vimont git at videolan.org
Mon Mar 23 11:37:27 CET 2020


vlc | branch: master | Romain Vimont <rom1v at videolabs.io> | Tue Mar 10 13:29:44 2020 +0100| [eccb61a4cbc0b77b5370ae0e50c4e2141cedfb2d] | committer: Jean-Baptiste Kempf

opengl: fix unused variable

The opengl_vtable_t is used only if USE_OPENGL_ES2 is not defined.
Declare it inside the ifdef-block.

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=eccb61a4cbc0b77b5370ae0e50c4e2141cedfb2d
---

 modules/video_output/opengl/fragment_shaders.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/video_output/opengl/fragment_shaders.c b/modules/video_output/opengl/fragment_shaders.c
index dfc4f51d1e..e52e820522 100644
--- a/modules/video_output/opengl/fragment_shaders.c
+++ b/modules/video_output/opengl/fragment_shaders.c
@@ -433,7 +433,6 @@ opengl_fragment_shader_init(struct vlc_gl_renderer *renderer, GLenum tex_target,
                             vlc_fourcc_t chroma, video_color_space_t yuv_space)
 {
     struct vlc_gl_interop *interop = renderer->interop;
-    const opengl_vtable_t *vt = renderer->vt;
 
     const char *swizzle_per_tex[PICTURE_PLANE_MAX] = { NULL, };
     const bool is_yuv = vlc_fourcc_IsYUV(chroma);
@@ -532,6 +531,7 @@ opengl_fragment_shader_init(struct vlc_gl_renderer *renderer, GLenum tex_target,
             {
                 GLint fb_depth = 0;
 #if !defined(USE_OPENGL_ES2)
+                const opengl_vtable_t *vt = renderer->vt;
                 /* fetch framebuffer depth (we are already bound to the default one). */
                 if (vt->GetFramebufferAttachmentParameteriv != NULL)
                     vt->GetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, GL_BACK_LEFT,



More information about the vlc-commits mailing list