[vlc-commits] [Git][videolan/vlc][master] vgl: ensure the proper module is used

Steve Lhomme (@robUx4) gitlab at videolan.org
Tue Nov 21 06:29:17 UTC 2023



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
d8c2df48 by Alexandre Janniaux at 2023-11-21T06:14:01+00:00
vgl: ensure the proper module is used

We want to ensure that whether OpenGLES2 or OpenGL is selected is
reflected into the vlc_gl_t provider object, otherwise we might confuse
the object as being providing the wrong API.

- - - - -


1 changed file:

- modules/video_output/vgl.c


Changes:

=====================================
modules/video_output/vgl.c
=====================================
@@ -149,9 +149,21 @@ static int Open(vlc_gl_t *gl, unsigned width, unsigned height,
     vout_display_sys_t * sys;
 
     libvlc_video_engine_t engineType = var_InheritInteger( gl, "vout-cb-type" );
-    if ( engineType != libvlc_video_engine_opengl &&
-         engineType != libvlc_video_engine_gles2 )
-        return VLC_ENOTSUP;
+    switch (engineType)
+    {
+        case libvlc_video_engine_opengl:
+            if (gl->api_type != VLC_OPENGL)
+                return VLC_ENOTSUP;
+            break;
+
+        case libvlc_video_engine_gles2:
+            if (gl->api_type != VLC_OPENGL_ES2)
+                return VLC_ENOTSUP;
+            break;
+
+        default:
+            return VLC_ENOTSUP;
+    }
 
     if (gl_cfg->need_alpha)
     {



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/d8c2df484b14c907b5f2a6d992b8cb3c23497a98

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/d8c2df484b14c907b5f2a6d992b8cb3c23497a98
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list