summaryrefslogtreecommitdiffstats
path: root/m_config.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2010-11-15 23:41:59 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-11-15 23:41:59 +0200
commit9c1bafb93a8621bbf3b76687ec61bd7cf5f16263 (patch)
tree1bc7452bacdddb653c8f41ed7ffd08b21fd3e581 /m_config.c
parent721803c631c402ee7ed7aafa133c9c80702349e3 (diff)
downloadmpv-9c1bafb93a8621bbf3b76687ec61bd7cf5f16263.tar.bz2
mpv-9c1bafb93a8621bbf3b76687ec61bd7cf5f16263.tar.xz
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.
Diffstat (limited to 'm_config.c')
-rw-r--r--m_config.c3
1 files changed, 3 insertions, 0 deletions
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;
}