mirror of
https://github.com/mpv-player/mpv
synced 2024-12-26 17:12:36 +00:00
vaapi/GLX: don't access VO backend
Same as with the VDA change.
This commit is contained in:
parent
bfa7893fe9
commit
031aef9be9
@ -64,12 +64,13 @@ static int create(struct gl_hwdec *hw)
|
||||
{
|
||||
if (hw->info->vaapi_ctx)
|
||||
return -1;
|
||||
if (!hw->mpgl->vo->x11 || !glXGetCurrentContext())
|
||||
Display *x11disp = glXGetCurrentDisplay();
|
||||
if (!x11disp)
|
||||
return -1;
|
||||
struct priv *p = talloc_zero(hw, struct priv);
|
||||
hw->priv = p;
|
||||
p->log = hw->log;
|
||||
p->display = vaGetDisplayGLX(hw->mpgl->vo->x11->display);
|
||||
p->display = vaGetDisplayGLX(x11disp);
|
||||
if (!p->display)
|
||||
return -1;
|
||||
p->ctx = va_initialize(p->display, p->log);
|
||||
@ -85,7 +86,7 @@ static int create(struct gl_hwdec *hw)
|
||||
static int reinit(struct gl_hwdec *hw, const struct mp_image_params *params)
|
||||
{
|
||||
struct priv *p = hw->priv;
|
||||
GL *gl = hw->mpgl->gl;
|
||||
GL *gl = hw->gl;
|
||||
VAStatus status;
|
||||
|
||||
destroy_texture(hw);
|
||||
|
@ -7,6 +7,7 @@ int main(int argc, char *argv[]) {
|
||||
glXCreateContext(NULL, NULL, NULL, True);
|
||||
glXQueryExtensionsString(NULL, 0);
|
||||
glXGetProcAddressARB("");
|
||||
glXGetCurrentDisplay();
|
||||
glFinish();
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user