Skip to content

Commit 4879430

Browse files
committed
options: reset some options between files by default
Add some options to --reset-on-next-file's default value that you commonly don't want to keep between files. The catch is that if you specify options in the command line or mpv.conf --reset-on-next-file resets to those values, but the vast majority of uses for these options should be at runtime.
1 parent 1f7c223 commit 4879430

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

DOCS/man/options.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -816,12 +816,12 @@ Program Behavior
816816
defined profiles.
817817

818818
``--reset-on-next-file=<all|option1,option2,...>``
819-
Normally, mpv will try to keep all settings when playing the next file on
819+
Normally, mpv will try to keep most settings when playing the next file on
820820
the playlist, even if they were changed by the user during playback. (This
821821
behavior is the opposite of MPlayer's, which tries to reset all settings
822822
when starting next file.)
823823

824-
Default: Do not reset anything.
824+
Default: ``ab-loop-a``, ``ab-loop-b``, ``video-crop``, ``video-rotate``.
825825

826826
This can be changed with this option. It accepts a list of options, and
827827
mpv will reset the value of these options on playback start to the initial

options/options.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -949,6 +949,15 @@ static const m_option_t mp_opts[] = {
949949
static const struct MPOpts mp_default_opts = {
950950
.use_terminal = true,
951951
.msg_color = true,
952+
953+
.reset_options = (char *[]){
954+
"ab-loop-a",
955+
"ab-loop-b",
956+
"video-crop",
957+
"video-rotate",
958+
NULL
959+
},
960+
952961
.softvol_max = 130,
953962
.softvol_volume = 100,
954963
.softvol_gain_max = 12,

0 commit comments

Comments
 (0)