diff options
author | sfan5 <sfan5@live.de> | 2021-11-15 21:28:56 +0100 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2021-11-17 22:38:34 +0100 |
commit | c3d78b00173a37f715510761f4cd6d01b1e403a2 (patch) | |
tree | c791bb6c91bcb42eb3351b466c51f2e018d9c90c /video/out/opengl/egl_helpers.c | |
parent | f5cc28a627bc2adc3ce63e69384905a0c3fea66b (diff) | |
download | mpv-c3d78b00173a37f715510761f4cd6d01b1e403a2.tar.bz2 mpv-c3d78b00173a37f715510761f4cd6d01b1e403a2.tar.xz |
video: opengl: use gl_check_extension() instead of strstr()
Using a simple substring match for extension checks is considered bad practice
because it's incorrect when one extension is a prefix of another's name.
This will almost surely not make a difference in practice but do it for correctness anyway.
Diffstat (limited to 'video/out/opengl/egl_helpers.c')
-rw-r--r-- | video/out/opengl/egl_helpers.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/video/out/opengl/egl_helpers.c b/video/out/opengl/egl_helpers.c index a81f9f4853..6c3604daa5 100644 --- a/video/out/opengl/egl_helpers.c +++ b/video/out/opengl/egl_helpers.c @@ -306,7 +306,7 @@ EGLDisplay mpegl_get_display(EGLenum platform, const char *platform_ext_name, // If this is either EGL 1.5, or 1.4 with EGL_EXT_client_extensions, then // this must return a valid extension string. const char *exts = eglQueryString(EGL_NO_DISPLAY, EGL_EXTENSIONS); - if (!exts || !gl_check_extension(exts, platform_ext_name)) + if (!gl_check_extension(exts, platform_ext_name)) return EGL_NO_DISPLAY; // Before we go through the EGL 1.4 BS, try if we can use native EGL 1.5 |