From 9c1bafb93a8621bbf3b76687ec61bd7cf5f16263 Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Mon, 15 Nov 2010 23:41:59 +0200 Subject: options: fix autoloaded profile handling of flag options When loading automatically enabled profiles (like "[extension.avi]") flag options were handled as on the command line; for example "fs=no" was interpreted like "-fs" on command line, ignoring the "no" part. Fix the parsing to treat them the same as other config file entries. --- m_config.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/m_config.c b/m_config.c index 204115f1db..266ee10323 100644 --- a/m_config.c +++ b/m_config.c @@ -595,8 +595,11 @@ m_config_set_profile(m_config_t* config, m_profile_t* p) { mp_tmsg(MSGT_CFGPARSER, MSGL_WARN, "WARNING: Profile inclusion too deep.\n"); return; } + int prev_mode = config->mode; + config->mode = M_CONFIG_FILE; config->profile_depth++; for(i = 0 ; i < p->num_opts ; i++) m_config_set_option(config,p->opts[2*i],p->opts[2*i+1]); config->profile_depth--; + config->mode = prev_mode; } -- cgit v1.2.3