From 7af15f2d6efd8845434c2e179dac243f560ecf16 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(-) (limited to 'mpvcore') diff --git a/mpvcore/mplayer.c b/mpvcore/mplayer.c index b1fb55dc87..6c359a6b82 100644 --- a/mpvcore/mplayer.c +++ b/mpvcore/mplayer.c @@ -4171,6 +4171,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); @@ -4188,17 +4199,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