[vlc-commits] gl: fix SIGSEGV on gles2 with 10 bits

Thomas Guillem git at videolan.org
Sun Sep 3 14:40:45 CEST 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Sun Sep  3 14:39:39 2017 +0200| [a4fd2a6bc620118eff9e076f07a1e7da9430dc24] | committer: Thomas Guillem

gl: fix SIGSEGV on gles2 with 10 bits

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

 modules/video_output/opengl/fragment_shaders.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/video_output/opengl/fragment_shaders.c b/modules/video_output/opengl/fragment_shaders.c
index 294330ca27..3d04202568 100644
--- a/modules/video_output/opengl/fragment_shaders.c
+++ b/modules/video_output/opengl/fragment_shaders.c
@@ -51,6 +51,9 @@
 static int GetTexFormatSize(opengl_tex_converter_t *tc, int target,
                             int tex_format, int tex_internal, int tex_type)
 {
+    if (!tc->vt->GetTexLevelParameteriv)
+        return -1;
+
     GLint tex_param_size;
     switch (tex_format)
     {



More information about the vlc-commits mailing list