From 42512c92de9fb49f1b2af48889313f0ff0c9fd6b Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Tue, 18 May 2021 20:00:01 +1000 Subject: [PATCH] gl/context: move egl creation lower in priority on _new() e.g. if running a dual wgl/egl built library, then egl will always succeed in creating the GstGLContext because almost anything could support egl, as long as eglGetDisplay() works. wgl, however has a check for the correct display type so should move earlier in the tried list. Part-of: --- gst-libs/gst/gl/gstglcontext.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gst-libs/gst/gl/gstglcontext.c b/gst-libs/gst/gl/gstglcontext.c index 115bbd0..88e1020 100644 --- a/gst-libs/gst/gl/gstglcontext.c +++ b/gst-libs/gst/gl/gstglcontext.c @@ -353,10 +353,6 @@ gst_gl_context_new (GstGLDisplay * display) if (!context && (!user_choice || g_strstr_len (user_choice, 3, "glx"))) context = GST_GL_CONTEXT (gst_gl_context_glx_new (display)); #endif -#if GST_GL_HAVE_PLATFORM_EGL - if (!context && (!user_choice || g_strstr_len (user_choice, 3, "egl"))) - context = GST_GL_CONTEXT (gst_gl_context_egl_new (display)); -#endif #if GST_GL_HAVE_PLATFORM_WGL if (!context && (!user_choice || g_strstr_len (user_choice, 3, "wgl"))) context = GST_GL_CONTEXT (gst_gl_context_wgl_new (display)); @@ -365,6 +361,10 @@ gst_gl_context_new (GstGLDisplay * display) if (!context && (!user_choice || g_strstr_len (user_choice, 4, "eagl"))) context = GST_GL_CONTEXT (gst_gl_context_eagl_new (display)); #endif +#if GST_GL_HAVE_PLATFORM_EGL + if (!context && (!user_choice || g_strstr_len (user_choice, 3, "egl"))) + context = GST_GL_CONTEXT (gst_gl_context_egl_new (display)); +#endif if (!context) { /* subclass returned a NULL context */ -- 2.7.4