diff options
author | wm4 <wm4@nowhere> | 2015-01-23 20:56:11 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-01-23 20:56:25 +0100 |
commit | a0a40eb2872d137898e6f96b8d46490f2e63071f (patch) | |
tree | 2e665b1ce92a6984c5498e8faaa38e0d6b2d7e92 /video/out/vo_opengl.c | |
parent | d76dbbd41427a12f03dac7ccc99d8c864b228d6b (diff) | |
download | mpv-a0a40eb2872d137898e6f96b8d46490f2e63071f.tar.bz2 mpv-a0a40eb2872d137898e6f96b8d46490f2e63071f.tar.xz |
vo: fix disabling/enabling smoothmotion at runtime
vo.c queried the VO at initialization whether it wants to be updated on
every display frame, or every video frame. If the smoothmotion option
was changed at runtime, the rendering mode in vo.c wasn't updated.
Just let vo_opengl set the mode directly. Abuse the existing
vo_set_flip_queue_offset() function for this.
Also add a comment suggesting the use of --display-fps to the manpage,
which doesn't have anything to do with the rest of this commit, but is
important to make smoothmotion run well.
Diffstat (limited to 'video/out/vo_opengl.c')
-rw-r--r-- | video/out/vo_opengl.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/video/out/vo_opengl.c b/video/out/vo_opengl.c index d3f1e7da7d..6a2a48fb47 100644 --- a/video/out/vo_opengl.c +++ b/video/out/vo_opengl.c @@ -303,7 +303,7 @@ static bool reparse_cmdline(struct gl_priv *p, char *args) if (r >= 0) { mpgl_lock(p->glctx); gl_video_set_options(p->renderer, opts->renderer_opts); - resize(p); + vo_set_flip_queue_params(p->vo, 0, opts->renderer_opts->smoothmotion); mpgl_unlock(p->glctx); } @@ -375,9 +375,6 @@ static int control(struct vo *vo, uint32_t request, void *data) char *arg = data; return reparse_cmdline(p, arg); } - case VOCTRL_GET_VSYNC_TIMED: - *(bool *)data = p->renderer_opts->smoothmotion; - return VO_TRUE; case VOCTRL_RESET: mpgl_lock(p->glctx); gl_video_reset(p->renderer); @@ -443,6 +440,7 @@ static int preinit(struct vo *vo) gl_video_set_output_depth(p->renderer, p->glctx->depth_r, p->glctx->depth_g, p->glctx->depth_b); gl_video_set_options(p->renderer, p->renderer_opts); + vo_set_flip_queue_params(vo, 0, p->renderer_opts->smoothmotion); p->cms = gl_lcms_init(p, vo->log, vo->global); if (!p->cms) |