diff --git a/player/configfiles.c b/player/configfiles.c index dc3de14679..4a9700c7cd 100644 --- a/player/configfiles.c +++ b/player/configfiles.c @@ -44,6 +44,7 @@ #include "common/playlist.h" #include "options/options.h" #include "options/m_property.h" +#include "input/input.h" #include "stream/stream.h" @@ -91,8 +92,10 @@ void mp_parse_cfgfiles(struct MPContext *mpctx) load_all_cfgfiles(mpctx, section, "mpv.conf|config"); - if (encoding) + if (encoding) { m_config_set_profile(mpctx->mconfig, SECT_ENCODE, 0); + mp_input_enable_section(mpctx->input, "encode", MP_INPUT_EXCLUSIVE); + } } static int try_load_config(struct MPContext *mpctx, const char *file, int flags, diff --git a/player/main.c b/player/main.c index 8ed0f4d94d..f40e89abda 100644 --- a/player/main.c +++ b/player/main.c @@ -415,8 +415,6 @@ int mp_initialize(struct MPContext *mpctx, char **options) MP_INFO(mpctx, "Encoding initialization failed.\n"); return -1; } - m_config_set_profile(mpctx->mconfig, "encoding", 0); - mp_input_enable_section(mpctx->input, "encode", MP_INPUT_EXCLUSIVE); } mp_load_scripts(mpctx);