diff options
author | wm4 <wm4@nowhere> | 2013-09-04 00:43:14 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-09-04 01:42:49 +0200 |
commit | 74be07c36d922a8a62ce7753a95c81885d9881d7 (patch) | |
tree | 5e3caf10aa51f9029d2f2a406794c8c6ec4e211d | |
parent | 54c371a293be5f06c6b6f1f5f728edeafa896ada (diff) | |
download | mpv-74be07c36d922a8a62ce7753a95c81885d9881d7.tar.bz2 mpv-74be07c36d922a8a62ce7753a95c81885d9881d7.tar.xz |
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.
-rw-r--r-- | mpvcore/mplayer.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/mpvcore/mplayer.c b/mpvcore/mplayer.c index 526239c681..6ac0ea86ad 100644 --- a/mpvcore/mplayer.c +++ b/mpvcore/mplayer.c @@ -4154,10 +4154,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); + } } } } |