From 1bf474e19afac869f643de0f51befdaed2872d23 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 22 Oct 2016 16:39:24 +0200 Subject: options: make --load-scripts runtime changeable Just that actually changing it at runtime won't do anything. This deals with a nasty initialization order issue with encoding. Encoding is initialized after options have initialized, but before --load-scripts is checked and executed. Encoding initialization accesses FFmpeg API, thus it has to run after FFmpeg is initialized (which also implies it's initialized after options/logging init). On the other hand, it sets the encoding builtin profile, which possibly sets --load-scripts to "no". That failed at this point because --load-scripts was marked as fixed. Just marking it as not fixed gets rid of the headache, even if it's not perfectly orthodox. --- options/options.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'options') diff --git a/options/options.c b/options/options.c index f97ce5362b..7a4deae776 100644 --- a/options/options.c +++ b/options/options.c @@ -302,7 +302,7 @@ const m_option_t mp_opts[] = { OPT_FLAG("ytdl", lua_load_ytdl, UPDATE_BUILTIN_SCRIPTS), OPT_STRING("ytdl-format", lua_ytdl_format, 0), OPT_KEYVALUELIST("ytdl-raw-options", lua_ytdl_raw_options, 0), - OPT_FLAG("load-scripts", auto_load_scripts, M_OPT_FIXED), + OPT_FLAG("load-scripts", auto_load_scripts, 0), #endif // ------------------------- stream options -------------------- -- cgit v1.2.3