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_option.h | |
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_option.h')
-rw-r--r-- | m_option.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/m_option.h b/m_option.h index 57fdc33610..bb5f7da304 100644 --- a/m_option.h +++ b/m_option.h @@ -282,13 +282,14 @@ struct m_option { // The option is forbidden on the command line. #define M_OPT_NOCMD (1 << 3) -// The option is global in the \ref Config. -/** It won't be saved on push and the command line parser will set it when - * it's parsed (i.e. it won't be set later) - * e.g options : -v, -quiet - */ +// This option can't be set per-file when used with struct m_config. #define M_OPT_GLOBAL (1 << 4) +// This option is always considered per-file when used with struct m_config. +// When playback of a file ends, the option value will be restored to the value +// from before playback begin. +#define M_OPT_LOCAL (1 << 5) + // The option should be set during command line pre-parsing #define M_OPT_PRE_PARSE (1 << 6) |