summaryrefslogtreecommitdiffstats
path: root/player/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'player/main.c')
-rw-r--r--player/main.c14
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);