summaryrefslogtreecommitdiffstats
path: root/video/out/vo_opengl_cb.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-01-22 15:32:23 +0100
committerwm4 <wm4@nowhere>2015-01-22 15:32:23 +0100
commitaae9af348e62d5feba6547855003df0d954cb3ae (patch)
treedd0d28655c65e1f814bec3ef537ea377a941b9b7 /video/out/vo_opengl_cb.c
parent29cf62d20133b32e1514a315b4f7e013ed9cb768 (diff)
downloadmpv-aae9af348e62d5feba6547855003df0d954cb3ae.tar.bz2
mpv-aae9af348e62d5feba6547855003df0d954cb3ae.tar.xz
video: have a generic context struct for hwdec backends
Before this commit, each hw backend had their own specific struct types for context, and some, like VDA, had none at all. Add a context struct (mp_hwdec_ctx) that provides a somewhat generic way to pass the hwdec context around. Some things get slightly better, some slightly more verbose. mp_hwdec_info is still around; it's still needed, but is reduced to its role of handling delayed loading of the hwdec backend.
Diffstat (limited to 'video/out/vo_opengl_cb.c')
-rw-r--r--video/out/vo_opengl_cb.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/video/out/vo_opengl_cb.c b/video/out/vo_opengl_cb.c
index 3d5c16d8f2..1a2e44f718 100644
--- a/video/out/vo_opengl_cb.c
+++ b/video/out/vo_opengl_cb.c
@@ -227,9 +227,10 @@ int mpv_opengl_cb_init_gl(struct mpv_opengl_cb_context *ctx, const char *exts,
if (!ctx->renderer)
return MPV_ERROR_UNSUPPORTED;
- ctx->hwdec = gl_hwdec_load_api(ctx->log, ctx->gl, ctx->hwapi, &ctx->hwdec_info);
+ ctx->hwdec = gl_hwdec_load_api(ctx->log, ctx->gl, ctx->hwapi);
gl_video_set_hwdec(ctx->renderer, ctx->hwdec);
-
+ if (ctx->hwdec)
+ ctx->hwdec_info.hwctx = ctx->hwdec->hwctx;
pthread_mutex_lock(&ctx->lock);
ctx->eq = *gl_video_eq_ptr(ctx->renderer);