diff options
author | wm4 <wm4@nowhere> | 2016-09-01 14:21:32 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-09-01 14:21:32 +0200 |
commit | 6b4f560f3ccca0f7db345bd7a6ed65e9307b432d (patch) | |
tree | 831199a941a1bf34959ca3809460655eb05f7685 /options/m_option.h | |
parent | ec3c428e5fb03244b9f8f4f7432779b45a181166 (diff) | |
download | mpv-6b4f560f3ccca0f7db345bd7a6ed65e9307b432d.tar.bz2 mpv-6b4f560f3ccca0f7db345bd7a6ed65e9307b432d.tar.xz |
vo, ao: disable positional parameter suboptions
Positional parameters cause problems because they can be ambiguous with
flag options. If a flag option is removed or turned into a non-flag
option, it'll usually be interpreted as value for the first sub-option
(as positional parameter), resulting in very confusing error messages.
This changes it into a simple "option not found" error.
I don't expect that anyone really used positional parameters with --vo
or --ao. Although the docs for --ao=pulse seem to encourage positional
parameters for the host/sink options, which means it could possibly
annoy some PulseAudio users.
--vf and --af are still mostly used with positional parameters, so this
must be a configurable option in the option parser.
Diffstat (limited to 'options/m_option.h')
-rw-r--r-- | options/m_option.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/options/m_option.h b/options/m_option.h index 17c2d4e451..2901cb6288 100644 --- a/options/m_option.h +++ b/options/m_option.h @@ -142,6 +142,8 @@ struct m_obj_list { // Allow unknown entries, for which a dummy entry is inserted, and whose // options are skipped and ignored. bool allow_unknown_entries; + // This helps with confusing error messages if unknown flag options are used. + bool disallow_positional_parameters; }; // Find entry by name |