mirror of
https://github.com/mpv-player/mpv
synced 2024-11-03 03:19:24 +01:00
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.
This commit is contained in:
parent
bf5c4c42fa
commit
1bf474e19a
@ -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 --------------------
|
||||
|
Loading…
Reference in New Issue
Block a user