From 54c371a293be5f06c6b6f1f5f728edeafa896ada Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 4 Sep 2013 00:31:01 +0200 Subject: mplayer: don't let playback resume force options that are file local This happens by default with pausing: if a file was paused when doing quit_watch_later, then resume and unpause, then the file played after that would start in paused mode. This is because the pause option is backed up at thr wrong place, so it backs up the state from resuming, instead of whatever it was set to before that. --- mpvcore/mplayer.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/mpvcore/mplayer.c b/mpvcore/mplayer.c index e864d1baaf..526239c681 100644 --- a/mpvcore/mplayer.c +++ b/mpvcore/mplayer.c @@ -4151,6 +4151,17 @@ static void play_current_file(struct MPContext *mpctx) mpctx->add_osd_seek_info &= OSD_SEEK_INFO_EDITION; + 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); + } + } + } + load_per_protocol_config(mpctx->mconfig, mpctx->filename); load_per_extension_config(mpctx->mconfig, mpctx->filename); load_per_file_config(mpctx->mconfig, mpctx->filename, opts->use_filedir_conf); @@ -4168,17 +4179,6 @@ 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_backup_all_opts(mpctx->mconfig); - } else { - m_config_backup_opt(mpctx->mconfig, opt); - } - } - } - // We must enable getch2 here to be able to interrupt network connection // or cache filling if (opts->consolecontrols && !opts->slave_mode) { -- cgit v1.2.3