From ed3187b41a24b2f6765c1a98fc7683f8f1cfe870 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 4 Sep 2013 00:43:14 +0200 Subject: 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. --- mpvcore/mplayer.c | 10 ++++++---- 1 file 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); + } } } } -- cgit v1.2.3