1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-28 18:12:22 +00:00

player: do not load encoding config files in non-encoding mode

It's annoying and unnecessary. They can be manually loaded if really
needed (for things like previewing).

Also remove the #if. It was for suppressing warnings, and we don't need
to be so careful about this in the relatively obscure encoding mode.
This commit is contained in:
wm4 2015-04-21 21:53:24 +02:00
parent eb62d7ec40
commit 0b240bca8a

View File

@ -72,16 +72,14 @@ void mp_parse_cfgfiles(struct MPContext *mpctx)
// So we "divert" normal options into a separate section, and the diverted
// section is never used - unless maybe it's explicitly referenced from an
// encoding profile.
if (encoding)
if (encoding) {
section = "playback-default";
// The #if is a stupid hack to avoid errors if libavfilter is not available.
#if HAVE_LIBAVFILTER && HAVE_ENCODING
char *cf = mp_find_config_file(NULL, mpctx->global, "encoding-profiles.conf");
if (cf)
m_config_parse_config_file(mpctx->mconfig, cf, SECT_ENCODE, 0);
talloc_free(cf);
#endif
char *cf = mp_find_config_file(NULL, mpctx->global, "encoding-profiles.conf");
if (cf)
m_config_parse_config_file(mpctx->mconfig, cf, SECT_ENCODE, 0);
talloc_free(cf);
}
load_all_cfgfiles(mpctx, section, "mpv.conf|config");