mplayer: handle --reset-on-next-file=""

The option list contains an empty string member with this option value,
so ignore that. I'm not sure whether the option list should maybe be
empty in this case, but it could be the wrong thing in case of other
options.
This commit is contained in:
wm4 2013-09-04 00:43:14 +02:00
parent 7af15f2d6e
commit ed3187b41a
1 changed files with 6 additions and 4 deletions

View File

@ -4174,10 +4174,12 @@ static void play_current_file(struct MPContext *mpctx)
if (opts->reset_options) {
for (int n = 0; opts->reset_options[n]; n++) {
const char *opt = opts->reset_options[n];
if (strcmp(opt, "all") == 0) {
m_config_backup_all_opts(mpctx->mconfig);
} else {
m_config_backup_opt(mpctx->mconfig, opt);
if (opt[0]) {
if (strcmp(opt, "all") == 0) {
m_config_backup_all_opts(mpctx->mconfig);
} else {
m_config_backup_opt(mpctx->mconfig, opt);
}
}
}
}