Don't assume the available EGL display is a wayland display - instead, check the the GStreamer GL context is EGL, and then use gst_gl_display_egl_from_gl_display to create a GstGLDisplayEGL from that, which also adds refcounting around the underlying EGLDisplay. Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1385 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1752>