glx renderer segfaults loading vaapi gl interop
On the latest 4.x, the glx renderer segfaults loading the vaapi interop.
Walking through Open() in modules/video_output/opengl/interop_vaapi.c I can see why:
vlc_gl_HasExtension("GL_OES_EGL_image") does not fail, because my GLX implementation advertises this extension.
vlc_gl_GetProcAddress("eglGetCurrentDisplay") does not return NULL, because glXGetProcAddress() never returns NULL [1].
priv->egl.getCurrentDisplay() is undefined behavior at this point but for me returns with something that is not EGL_NO_DISPLAY so Open() carries on for now.
vlc_gl_GetProcAddress("eglQueryString") does not return NULL, because glXGetProcAddress() never returns NULL.
eglexts = priv->egl.queryString() is again undefined behavior but for me does not return NULL.
Then segfault in vlc_gl_StrHasToken(eglexts).
However, I don't know how to fix this. I don't know if GLX is not supposed to be hitting vaapi's Open() in the first place, or if it is intended that this module fail somewhere in Open(). It does seem curious to me that we are using GetProcAddress() for "eglGetCurrentDisplay", "eglQueryString", etc., when the vaapi interop appears to have a hard dependency on EGL and such functions, but there may be reasons for this that I don't have the right perspective to understand.
[1] https://dri.freedesktop.org/wiki/glXGetProcAddressNeverReturnsNULL/