diff options
Diffstat (limited to 'core/parser-cfg.c')
-rw-r--r-- | core/parser-cfg.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/core/parser-cfg.c b/core/parser-cfg.c index 8f90d3f5e6..a69f4545d2 100644 --- a/core/parser-cfg.c +++ b/core/parser-cfg.c @@ -41,9 +41,11 @@ static int recursion_depth = 0; /// Setup the \ref Config from a config file. /** \param config The config object. * \param conffile Path to the config file. + * \param flags M_SETOPT_* bits * \return 1 on sucess, -1 on error, 0 if file not accessible. */ -int m_config_parse_config_file(m_config_t *config, const char *conffile) +int m_config_parse_config_file(m_config_t *config, const char *conffile, + int flags) { #define PRINT_LINENUM mp_msg(MSGT_CFGPARSER, MSGL_ERR, "%s:%d: ", conffile, line_num) #define MAX_LINE_LEN 10000 @@ -63,6 +65,8 @@ int m_config_parse_config_file(m_config_t *config, const char *conffile) int errors = 0; m_profile_t *profile = NULL; + flags = flags | M_SETOPT_FROM_CONFIG_FILE; + mp_msg(MSGT_CFGPARSER, MSGL_V, "Reading config file %s", conffile); if (recursion_depth > MAX_RECURSION_DEPTH) { @@ -219,8 +223,7 @@ int m_config_parse_config_file(m_config_t *config, const char *conffile) if (profile) { tmp = m_config_set_profile_option(config, profile, bopt, bparam); } else { - tmp = m_config_set_option_ext(config, bopt, bparam, - M_SETOPT_FROM_CONFIG_FILE); + tmp = m_config_set_option_ext(config, bopt, bparam, flags); } if (tmp < 0) { PRINT_LINENUM; |