summaryrefslogtreecommitdiffstats
path: root/player/client.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-03-23 16:32:59 +0100
committerwm4 <wm4@nowhere>2015-03-23 16:32:59 +0100
commit167b75c50c673bc477d0b18b38cd1d20292ce8b8 (patch)
tree0c3143fa9cb40e25170cff23754a2a7dce1c8920 /player/client.c
parent67bdad9a43ba965b73e5914da2e46db8866dc14e (diff)
downloadmpv-167b75c50c673bc477d0b18b38cd1d20292ce8b8.tar.bz2
mpv-167b75c50c673bc477d0b18b38cd1d20292ce8b8.tar.xz
vo_opengl_cb: don't render OSD while VO is not created
Unlike other VOs, this rendered OSD even while no VO was created (because the renderer lives as long as the API user wants). Change this, and refactor the code so that the OSD object is accessible only while the VO is created. (There is a short time where the OSD can still be accessed even after VO destruction - this is not a race condition, though it's inelegant and unfortunately unavoidable.)
Diffstat (limited to 'player/client.c')
-rw-r--r--player/client.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/player/client.c b/player/client.c
index 3ed7ea620e..0285ec76b4 100644
--- a/player/client.c
+++ b/player/client.c
@@ -1685,7 +1685,7 @@ static mpv_opengl_cb_context *opengl_cb_get_context(mpv_handle *ctx)
{
mpv_opengl_cb_context *cb = ctx->mpctx->gl_cb_ctx;
if (!cb) {
- cb = mp_opengl_create(ctx->mpctx->global, ctx->mpctx->osd, ctx->clients);
+ cb = mp_opengl_create(ctx->mpctx->global, ctx->clients);
ctx->mpctx->gl_cb_ctx = cb;
}
return cb;