diff options
author | wm4 <wm4@nowhere> | 2014-12-31 19:12:44 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-12-31 19:12:44 +0100 |
commit | 65f2c6c71676e4359d313ecf27744e525b662134 (patch) | |
tree | 59c62ef844f7428306fbcf77113cabb1c58c3bcb /player/video.c | |
parent | 282e3202d52a84b868f6972532f10d97ee23c594 (diff) | |
download | mpv-65f2c6c71676e4359d313ecf27744e525b662134.tar.bz2 mpv-65f2c6c71676e4359d313ecf27744e525b662134.tar.xz |
vo_opengl_cb: pass context directly
This is simpler than setting the context after VO creation, which
requires the code to check for the context on every entrypoint.
Diffstat (limited to 'player/video.c')
-rw-r--r-- | player/video.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/player/video.c b/player/video.c index 3c46bb0ce8..f9a6a1c9a0 100644 --- a/player/video.c +++ b/player/video.c @@ -269,6 +269,7 @@ int reinit_video_chain(struct MPContext *mpctx) .input_ctx = mpctx->input, .osd = mpctx->osd, .encode_lavc_ctx = mpctx->encode_lavc_ctx, + .opengl_cb_context = mpctx->gl_cb_ctx, }; mpctx->video_out = init_best_video_out(mpctx->global, &ex); if (!mpctx->video_out) { @@ -278,9 +279,6 @@ int reinit_video_chain(struct MPContext *mpctx) goto err_out; } mpctx->mouse_cursor_visible = true; - - vo_control(mpctx->video_out, VOCTRL_SET_LIBMPV_OPENGL_CB_CONTEXT, - mpctx->gl_cb_ctx); } update_window_title(mpctx, true); |