summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-12-23 18:18:17 +0100
committerwm4 <wm4@nowhere>2016-12-23 18:18:17 +0100
commit1c761bd6f59c369e45037e80f781429da65734c3 (patch)
treed0123aa4693e4b79b66bdbc0715666db8f488bc4
parent1d5e95783e0bf05149fa6d5dc8a8aed3d02ff2e9 (diff)
downloadmpv-1c761bd6f59c369e45037e80f781429da65734c3.tar.bz2
mpv-1c761bd6f59c369e45037e80f781429da65734c3.tar.xz
options: deprecate some other complex --ad/--vd features
Who even needs those? Once these deprecations are gone, --ad/--vd are simple lists without any kind of complex matching.
-rw-r--r--DOCS/interface-changes.rst1
-rw-r--r--DOCS/man/options.rst5
-rw-r--r--common/codecs.c3
3 files changed, 7 insertions, 2 deletions
diff --git a/DOCS/interface-changes.rst b/DOCS/interface-changes.rst
index 7756aceb85..a6133a3848 100644
--- a/DOCS/interface-changes.rst
+++ b/DOCS/interface-changes.rst
@@ -46,6 +46,7 @@ Interface changes
- change how spdif codecs are selected. You can't enable spdif passthrough
with --ad anymore. This was deprecated; use --audio-spdif instead.
- deprecate the "family" selection with --ad/--vd
+ forcing/excluding codecs with "+", "-", "-" is deprecated as well
- explicitly mark --ad-spdif-dtshd as deprecated (it was done so a long time
ago, but it didn't complain when using the option)
--- mpv 0.22.0 ---
diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst
index f1101f27f8..eab9f8fefd 100644
--- a/DOCS/man/options.rst
+++ b/DOCS/man/options.rst
@@ -1145,9 +1145,10 @@ Audio
``-`` at the end of the list suppresses fallback on other available
decoders not on the ``--ad`` list. ``+`` in front of an entry forces the
decoder. Both of these should not normally be used, because they break
- normal decoder auto-selection!
+ normal decoder auto-selection! Both of these methods are deprecated.
- ``-`` in front of an entry disables selection of the decoder.
+ ``-`` in front of an entry disables selection of the decoder. This is
+ deprecated.
.. admonition:: Examples
diff --git a/common/codecs.c b/common/codecs.c
index 7a0afe466e..5e744da5de 100644
--- a/common/codecs.c
+++ b/common/codecs.c
@@ -92,11 +92,14 @@ struct mp_decoder_list *mp_select_decoders(struct mp_log *log,
bstr entry;
bstr_split_tok(sel, ",", &entry, &sel);
if (bstr_equals0(entry, "-")) {
+ mp_warn(log, "Excluding codecs is deprecated.\n");
stop = true;
break;
}
bool force = bstr_eatstart0(&entry, "+");
bool exclude = !force && bstr_eatstart0(&entry, "-");
+ if (exclude || force)
+ mp_warn(log, "Forcing or excluding codecs is deprecated.\n");
struct mp_decoder_list *dest = exclude ? remove : list;
bstr family, decoder;
if (bstr_split_tok(entry, ":", &family, &decoder)) {