summaryrefslogtreecommitdiffstats
path: root/video/out/vo.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-06-05 16:56:34 +0200
committerwm4 <wm4@nowhere>2016-06-05 16:56:34 +0200
commitc1cb04b6a3f4fef43bf69b43b5cf7a1e770f3839 (patch)
treecdbbab6c828cf0657f088814a3136646f545b9b0 /video/out/vo.c
parentee337b47becac7316eb890355cf73a6818cbd2b9 (diff)
downloadmpv-c1cb04b6a3f4fef43bf69b43b5cf7a1e770f3839.tar.bz2
mpv-c1cb04b6a3f4fef43bf69b43b5cf7a1e770f3839.tar.xz
vo_opengl: apply vo-cmdline command incrementally
Instead of implicitly resetting the options to defaults and then applying the options, they're always applied on top of the current options (in the same way adding new options to the CLI command line will). This does not apply to vo_opengl_cb, because that has an even worse mess which I refuse to deal with.
Diffstat (limited to 'video/out/vo.c')
-rw-r--r--video/out/vo.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/video/out/vo.c b/video/out/vo.c
index 3390f364f7..29b1baabdd 100644
--- a/video/out/vo.c
+++ b/video/out/vo.c
@@ -259,12 +259,12 @@ static struct vo *vo_create(bool probing, struct mpv_global *global,
mp_input_set_mouse_transform(vo->input_ctx, NULL, NULL);
if (vo->driver->encode != !!vo->encode_lavc_ctx)
goto error;
- struct m_config *config = m_config_from_obj_desc(vo, vo->log, &desc);
- if (m_config_apply_defaults(config, name, vo->opts->vo_defs) < 0)
+ vo->config = m_config_from_obj_desc(vo, vo->log, &desc);
+ if (m_config_apply_defaults(vo->config, name, vo->opts->vo_defs) < 0)
goto error;
- if (m_config_set_obj_params(config, args) < 0)
+ if (m_config_set_obj_params(vo->config, args) < 0)
goto error;
- vo->priv = config->optstruct;
+ vo->priv = vo->config->optstruct;
if (pthread_create(&vo->in->thread, NULL, vo_thread, vo))
goto error;