summaryrefslogtreecommitdiffstats
path: root/mpvcore
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-09-04 00:31:01 +0200
committerwm4 <wm4@nowhere>2013-09-04 00:31:14 +0200
commit7af15f2d6efd8845434c2e179dac243f560ecf16 (patch)
treeadee6b059198628eb4c4d3bce74f1a2b7294b6aa /mpvcore
parent353686e636822cd09ebac4c0ac1f491dff03ba0a (diff)
downloadmpv-7af15f2d6efd8845434c2e179dac243f560ecf16.tar.bz2
mpv-7af15f2d6efd8845434c2e179dac243f560ecf16.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.
Diffstat (limited to 'mpvcore')
-rw-r--r--mpvcore/mplayer.c22
1 files changed, 11 insertions, 11 deletions
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) {