diff options
author | wm4 <wm4@nowhere> | 2015-04-21 21:53:24 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-04-21 21:53:24 +0200 |
commit | 0b240bca8aa27a861d6c56be6808662f0e49d26b (patch) | |
tree | 1c18ec3deee73bb38bb8b0f49cc8f968bf6871dc | |
parent | eb62d7ec40cbe07a6177e399071809dec85ab1f3 (diff) | |
download | mpv-0b240bca8aa27a861d6c56be6808662f0e49d26b.tar.bz2 mpv-0b240bca8aa27a861d6c56be6808662f0e49d26b.tar.xz |
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.
-rw-r--r-- | player/configfiles.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/player/configfiles.c b/player/configfiles.c index e056b43e8e..b7d3795f60 100644 --- a/player/configfiles.c +++ b/player/configfiles.c @@ -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"); |