mplayer: make --save-position-on-quit save only on quit

When enabling --save-position-on-quit, playback position stored not only
on quit, but in any case playback of a file was stopped. This includes
going to the next file with playlist navigation commands.

After some discussion on IRC, it turned out that nobody thought this was
good behavior. Disable it, and really make it save only on quit.

Maybe the option is useless now, as the user could remap the CLOSE_WIN
key binding. On the other hand, CLOSE_WIN sounds and _is_ a bit obscure.
This commit is contained in:
wm4 2013-09-04 18:09:04 +02:00
parent b8d498da15
commit 62ab8441a6
2 changed files with 5 additions and 4 deletions

View File

@ -1760,8 +1760,10 @@
``--save-position-on-quit``
Always save the current playback position on quit. When this file is
played again later, the player will seek to the old playback position on
start. This affects any form of stopping playback (quitting, going to the
next file).
start. This does not happen if playback of a file is stopped in any other
way than quitting. For example, going to the next file in the playlist
will not save the position, and start playback at beginning the next time
the file is played.
This behavior is disabled by default, but is always available when quitting
the player with Shift+Q.

View File

@ -4470,8 +4470,7 @@ goto_reopen_demuxer: ;
terminate_playback: // don't jump here after ao/vo/getch initialization!
if (opts->position_save_on_quit && mpctx->stop_play != PT_RESTART &&
mpctx->stop_play != AT_END_OF_FILE)
if (opts->position_save_on_quit && mpctx->stop_play == PT_QUIT)
mp_write_watch_later_conf(mpctx);
if (mpctx->step_frames)