diff options
author | wm4 <wm4@nowhere> | 2016-09-21 15:56:54 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-09-21 17:35:00 +0200 |
commit | 75d12c174f0b5bb03c71872241f965ac674221d7 (patch) | |
tree | 39fb3f2026bdad9c3daece97183d048bef3b96be /player/main.c | |
parent | 14c232bdbfbb16f427632d579430fa1a522f7f73 (diff) | |
download | mpv-75d12c174f0b5bb03c71872241f965ac674221d7.tar.bz2 mpv-75d12c174f0b5bb03c71872241f965ac674221d7.tar.xz |
options: make input options generally runtime-settable
Diffstat (limited to 'player/main.c')
-rw-r--r-- | player/main.c | 14 |
1 files changed, 5 insertions, 9 deletions
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); |