diff options
Diffstat (limited to 'video/out/opengl/hwdec_vaglx.c')
-rw-r--r-- | video/out/opengl/hwdec_vaglx.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/video/out/opengl/hwdec_vaglx.c b/video/out/opengl/hwdec_vaglx.c index 77b1f27c51..a9c5d03af4 100644 --- a/video/out/opengl/hwdec_vaglx.c +++ b/video/out/opengl/hwdec_vaglx.c @@ -64,13 +64,13 @@ static void destroy(struct gl_hwdec *hw) { struct priv *p = hw->priv; destroy_texture(hw); + if (p->ctx) + hwdec_devices_remove(hw->devs, &p->ctx->hwctx); va_destroy(p->ctx); } static int create(struct gl_hwdec *hw) { - if (hw->hwctx) - return -1; Display *x11disp = glXGetCurrentDisplay(); if (!x11disp) return -1; @@ -126,7 +126,8 @@ static int create(struct gl_hwdec *hw) return -1; } - hw->hwctx = &p->ctx->hwctx; + p->ctx->hwctx.driver_name = hw->driver->name; + hwdec_devices_add(hw->devs, &p->ctx->hwctx); hw->converted_imgfmt = IMGFMT_RGB0; return 0; } |