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.
This commit is contained in:
Uoti Urpala 2010-11-15 23:41:59 +02:00
parent 721803c631
commit 9c1bafb93a
1 changed files with 3 additions and 0 deletions

View File

@ -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;
}