summaryrefslogtreecommitdiffstats
path: root/mpvcore/mplayer.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-09-04 00:43:14 +0200
committerwm4 <wm4@nowhere>2013-09-04 00:43:14 +0200
commited3187b41a24b2f6765c1a98fc7683f8f1cfe870 (patch)
tree74e33363c109da4dcb17a74639e1a63a2e62eb04 /mpvcore/mplayer.c
parent7af15f2d6efd8845434c2e179dac243f560ecf16 (diff)
downloadmpv-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.
Diffstat (limited to 'mpvcore/mplayer.c')
-rw-r--r--mpvcore/mplayer.c10
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);
+ }
}
}
}