From 02a9fbd0ce01949d4767b68d49ee06ec669c0d93 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 21 Dec 2013 18:48:54 +0100 Subject: 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. --- common/codecs.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'common') 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++) { -- cgit v1.2.3