summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-09-04 00:31:01 +0200
committerwm4 <wm4@nowhere>2013-09-04 01:42:46 +0200
commit54c371a293be5f06c6b6f1f5f728edeafa896ada (patch)
tree8a3daa1fe05b5c6947eefb6373e442b20364b65c
parent4788b8323c0d4c05ff217f024462d67e70785a6d (diff)
downloadmpv-54c371a293be5f06c6b6f1f5f728edeafa896ada.tar.bz2
mpv-54c371a293be5f06c6b6f1f5f728edeafa896ada.tar.xz
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.
-rw-r--r--mpvcore/mplayer.c22
1 files 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) {