From 75d12c174f0b5bb03c71872241f965ac674221d7 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 21 Sep 2016 15:56:54 +0200 Subject: options: make input options generally runtime-settable --- player/main.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'player/main.c') diff --git a/player/main.c b/player/main.c index c3488fc60c..676f82946c 100644 --- a/player/main.c +++ b/player/main.c @@ -408,6 +408,8 @@ int mp_initialize(struct MPContext *mpctx, char **options) return r == M_OPT_EXIT ? -2 : -1; } + mp_get_resume_defaults(mpctx); + // From this point on, all mpctx members are initialized. mpctx->initialized = true; mpctx->mconfig->option_set_callback = mp_on_set_option; @@ -434,12 +436,12 @@ int mp_initialize(struct MPContext *mpctx, char **options) return -1; } - MP_STATS(mpctx, "start init"); - if (!mpctx->playlist->first && !opts->player_idle_mode) return -3; - mp_input_load(mpctx->input); + MP_STATS(mpctx, "start init"); + + mp_input_load_config(mpctx->input); #if HAVE_ENCODING if (opts->encode_opts->file && opts->encode_opts->file[0]) { @@ -459,17 +461,11 @@ int mp_initialize(struct MPContext *mpctx, char **options) MP_WARN(mpctx, "There will be no OSD and no text subtitles.\n"); #endif - mp_get_resume_defaults(mpctx); - - // Lua user scripts (etc.) can call arbitrary functions. Load them at a point - // where this is safe. mp_load_scripts(mpctx); if (opts->force_vo == 2 && handle_force_window(mpctx, false) < 0) return -1; - mpctx->ipc_ctx = mp_init_ipc(mpctx->clients, mpctx->global); - #ifdef _WIN32 if (opts->w32_priority > 0) SetPriorityClass(GetCurrentProcess(), opts->w32_priority); -- cgit v1.2.3