summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Waters <matthew@centricular.com>2021-05-18 20:00:01 +1000
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>2021-05-19 10:15:56 +0000
commit42512c92de9fb49f1b2af48889313f0ff0c9fd6b (patch)
tree5fc7eb0b4890c348c3a5213cfad03dc8136a28fd
parentf0eca69a14137b8a9383fe2706c31f2365ff8b36 (diff)
downloadgstreamer-plugins-base-42512c92de9fb49f1b2af48889313f0ff0c9fd6b.tar.gz
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: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1154>
-rw-r--r--gst-libs/gst/gl/gstglcontext.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gst-libs/gst/gl/gstglcontext.c b/gst-libs/gst/gl/gstglcontext.c
index 115bbd08c..88e1020c0 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 */