From 0b240bca8aa27a861d6c56be6808662f0e49d26b Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 21 Apr 2015 21:53:24 +0200 Subject: 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. --- player/configfiles.c | 14 ++++++-------- 1 file 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"); -- cgit v1.2.3