[vlc-commits] opengl: fix vdpau GLX usage

Thomas Guillem git at videolan.org
Tue Mar 13 17:07:51 CET 2018


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Mar 13 16:46:09 2018 +0100| [6cc83a000bdb1509b09a608dc4c342dac7fb0bfd] | committer: Thomas Guillem

opengl: fix vdpau GLX usage

Indeed, this variable can be "any" if it was previously reset from preference
settings.

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

 modules/video_output/opengl/display.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/modules/video_output/opengl/display.c b/modules/video_output/opengl/display.c
index b3bafa15c6..e317397c9b 100644
--- a/modules/video_output/opengl/display.c
+++ b/modules/video_output/opengl/display.c
@@ -118,8 +118,12 @@ static int Open (vlc_object_t *obj)
             case VLC_CODEC_VDPAU_VIDEO_420:
             {
                 /* Force the option only if it was not previously set */
-                if (gl_name == NULL)
+                if (gl_name == NULL || gl_name[0] == 0
+                 || strcmp(gl_name, "any") == 0)
+                {
+                    free(gl_name);
                     gl_name = strdup("glx");
+                }
                 break;
             }
             default:



More information about the vlc-commits mailing list