diff options
author | wm4 <wm4@nowhere> | 2012-09-18 14:29:22 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-09-23 14:56:30 +0200 |
commit | af14474879f088031154ce441341fc56352b7341 (patch) | |
tree | 513b6f3d9cdefe4a69026fda6ede9419bce644a2 /m_config.c | |
parent | 5a617d02d95d59fbf06e865489d75fdc1ce46203 (diff) | |
download | mpv-af14474879f088031154ce441341fc56352b7341.tar.bz2 mpv-af14474879f088031154ce441341fc56352b7341.tar.xz |
options: make cache option always per-file
When playing a network stream, the cache is automatically enabled. We
don't want the cache to stay enabled when playback ends. (For example,
the next file to be played could be a local file, and even if that is
relatively contrieved, we want to do the right thing.)
Introduced the flag M_OPT_LOCAL to force an option to be always file
local. This allows enabling the old mplayer semantics on a per option
basis.
Diffstat (limited to 'm_config.c')
-rw-r--r-- | m_config.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/m_config.c b/m_config.c index 56886e08eb..ae7f528060 100644 --- a/m_config.c +++ b/m_config.c @@ -237,6 +237,10 @@ void m_config_enter_file_local(struct m_config *config) { assert(!config->file_local_mode); config->file_local_mode = true; + for (struct m_config_option *co = config->opts; co; co = co->next) { + if (co->opt->flags & M_OPT_LOCAL) + ensure_backup(config, co); + } } void m_config_leave_file_local(struct m_config *config) |