From f8ab59eacdde31af39f4defeb964adf4de140a50 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 21 May 2018 16:25:52 +0200 Subject: player: get rid of mpv_global.opts This was always a legacy thing. Remove it by applying an orgy of mp_get_config_group() calls, and sometimes m_config_cache_alloc() or mp_read_option_raw(). win32 changes untested. --- input/input.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'input/input.c') diff --git a/input/input.c b/input/input.c index c8f1a64ad5..9e96da267d 100644 --- a/input/input.c +++ b/input/input.c @@ -1370,8 +1370,11 @@ void mp_input_load_config(struct input_ctx *ictx) } #if HAVE_WIN32_PIPES - if (ictx->global->opts->input_file && *ictx->global->opts->input_file) - mp_input_pipe_add(ictx, ictx->global->opts->input_file); + char *ifile; + mp_read_option_raw(ictx->global, "input-file", &m_option_type_string, &ifile); + if (ifile && ifile[0]) + mp_input_pipe_add(ictx, ifile); + talloc_free(ifile); #endif input_unlock(ictx); -- cgit v1.2.3