mirror of
https://github.com/mpv-player/mpv
synced 2025-03-11 08:37:59 +00:00
vo_gpu: context_x11egl: check eglGetConfigAttrib() for errors
Not sure why it assumes that it always succeeds (although generally it won't fail).
This commit is contained in:
parent
bcfabf40a4
commit
cd8fd4b788
@ -125,7 +125,10 @@ static bool mpegl_init(struct ra_ctx *ctx)
|
||||
goto uninit;
|
||||
|
||||
int vID, n;
|
||||
eglGetConfigAttrib(p->egl_display, config, EGL_NATIVE_VISUAL_ID, &vID);
|
||||
if (!eglGetConfigAttrib(p->egl_display, config, EGL_NATIVE_VISUAL_ID, &vID)) {
|
||||
MP_FATAL(ctx, "Getting X visual ID failed!\n");
|
||||
goto uninit;
|
||||
}
|
||||
MP_VERBOSE(ctx, "chose visual 0x%x\n", vID);
|
||||
XVisualInfo template = {.visualid = vID};
|
||||
XVisualInfo *vi = XGetVisualInfo(vo->x11->display, VisualIDMask, &template, &n);
|
||||
|
Loading…
Reference in New Issue
Block a user