From 031aef9be9052dce8ff7b7446b979b2e2d418b3d Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 3 Dec 2014 21:07:18 +0100 Subject: vaapi/GLX: don't access VO backend Same as with the VDA change. --- video/out/gl_hwdec_vaglx.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'video/out') diff --git a/video/out/gl_hwdec_vaglx.c b/video/out/gl_hwdec_vaglx.c index 665b800efb..a8b3a3f8ad 100644 --- a/video/out/gl_hwdec_vaglx.c +++ b/video/out/gl_hwdec_vaglx.c @@ -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); -- cgit v1.2.3