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.
This commit is contained in:
1 parent
5f0fbacf16
commit
02a9fbd0ce
1 file changed
+2
-3
+2
-3
@@ -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++) {
|
||||
|
||||
Reference in new issue
Block a user