[vlc-devel] [PATCH 8/8] opengl: display: use vlc_gl_GetCoreProcAddress

Thomas Guillem thomas at gllm.fr
Wed May 23 09:19:28 CEST 2018


---
 modules/video_output/opengl/vout_helper.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/modules/video_output/opengl/vout_helper.c b/modules/video_output/opengl/vout_helper.c
index cba43caf4d..bfaabf4320 100644
--- a/modules/video_output/opengl/vout_helper.c
+++ b/modules/video_output/opengl/vout_helper.c
@@ -742,7 +742,14 @@ vout_display_opengl_t *vout_display_opengl_New(video_format_t *fmt,
 #if defined(USE_OPENGL_ES2) || defined(HAVE_GL_CORE_SYMBOLS)
 #define GET_PROC_ADDR_CORE(name) vgl->vt.name = gl##name
 #else
-#define GET_PROC_ADDR_CORE(name) GET_PROC_ADDR_EXT(name, true)
+#define GET_PROC_ADDR_CORE(name) do { \
+    vgl->vt.name = vlc_gl_GetCoreProcAddress(gl, "gl"#name); \
+    if (vgl->vt.name == NULL) { \
+        msg_Err(gl, "gl"#name" symbol not found, bailing out"); \
+        free(vgl); \
+        return NULL; \
+    } \
+} while(0)
 #endif
 #define GET_PROC_ADDR_EXT(name, critical) do { \
     vgl->vt.name = vlc_gl_GetProcAddress(gl, "gl"#name); \
-- 
2.17.0



More information about the vlc-devel mailing list