summaryrefslogtreecommitdiffstats
path: root/core/mplayer.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-04-10 21:06:00 +0200
committerwm4 <wm4@nowhere>2013-04-10 21:32:46 +0200
commit9df2260506f825a05ecd500496260292ef2481aa (patch)
treed17e38880cf9d54272dc0de153ff8a0713598493 /core/mplayer.c
parent62daa08d3b9e32f6d7f81bae4407faab4347c90d (diff)
downloadmpv-9df2260506f825a05ecd500496260292ef2481aa.tar.bz2
mpv-9df2260506f825a05ecd500496260292ef2481aa.tar.xz
core: add --reset-on-next-file option
This option can be used to selectively reset settings when playing the next file in the playlist (i.e. restore mplayer and mplayer2 behavior). Might remove this option again should it turn out that nobody uses it.
Diffstat (limited to 'core/mplayer.c')
-rw-r--r--core/mplayer.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/core/mplayer.c b/core/mplayer.c
index 0a108cb514..7dbd4f59bb 100644
--- a/core/mplayer.c
+++ b/core/mplayer.c
@@ -3877,6 +3877,17 @@ static void play_current_file(struct MPContext *mpctx)
load_per_file_options(mpctx->mconfig, mpctx->playlist->current->params,
mpctx->playlist->current->num_params);
+ 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_mark_all_file_local(mpctx->mconfig);
+ } else {
+ m_config_mark_file_local(mpctx->mconfig, opt);
+ }
+ }
+ }
+
// We must enable getch2 here to be able to interrupt network connection
// or cache filling
if (opts->consolecontrols && !opts->slave_mode) {