diff options
author | wm4 <wm4@nowhere> | 2013-09-04 00:43:14 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-09-04 00:43:14 +0200 |
commit | ed3187b41a24b2f6765c1a98fc7683f8f1cfe870 (patch) | |
tree | 74e33363c109da4dcb17a74639e1a63a2e62eb04 | |
parent | 7af15f2d6efd8845434c2e179dac243f560ecf16 (diff) | |
download | mpv-ed3187b41a24b2f6765c1a98fc7683f8f1cfe870.tar.bz2 mpv-ed3187b41a24b2f6765c1a98fc7683f8f1cfe870.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 6c359a6b82..12bf0a3aec 100644 --- a/mpvcore/mplayer.c +++ b/mpvcore/mplayer.c @@ -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); + } } } } |