Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • VLC VLC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,725
    • Issues 3,725
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 236
    • Merge requests 236
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • VideoLANVideoLAN
  • VLCVLC
  • Issues
  • #26813
Closed
Open
Issue created Apr 08, 2022 by Jeffrey Knockel@jeffkContributor

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/

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking

VideoLAN code repository instance