diff options
author | wm4 <wm4@nowhere> | 2013-12-21 18:48:54 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-12-21 20:50:13 +0100 |
commit | 02a9fbd0ce01949d4767b68d49ee06ec669c0d93 (patch) | |
tree | 6dabbf7cd0a4cf533795e9c4e09deed9cd5e63f4 /common | |
parent | 5f0fbacf1650392238d49df23a799ba4938f9326 (diff) | |
download | mpv-02a9fbd0ce01949d4767b68d49ee06ec669c0d93.tar.bz2 mpv-02a9fbd0ce01949d4767b68d49ee06ec669c0d93.tar.xz |
codecs: avoid having to print error message
The mp_select_decoders() function doesn't have a log context (and I
don't want to give it one), so get rid of the mp_msg error message by
enhancing the semantics such that the syntax error is replaced by a new
feature. Now doing "--ad=something" will enable all decoders in the
"something" module, same as "--ad=something:*". Pretty useless, but gets
rid of the annoyance.
Diffstat (limited to 'common')
-rw-r--r-- | common/codecs.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/common/codecs.c b/common/codecs.c index 55e2bdf344..a71a7a4be2 100644 --- a/common/codecs.c +++ b/common/codecs.c @@ -98,9 +98,8 @@ struct mp_decoder_list *mp_select_decoders(struct mp_decoder_list *all, struct mp_decoder_list *dest = exclude ? remove : list; bstr family, decoder; if (!bstr_split_tok(entry, ":", &family, &decoder)) { - mp_msg(MSGT_CFGPARSER, MSGL_ERR, "Decoders must be specified as " - "'family:decoder' for the --ad/--vd options.\n"); - break; + family = entry; + decoder = bstr0("*"); } if (bstr_equals0(decoder, "*")) { for (int n = 0; n < all->num_entries; n++) { |