diff options
author | wm4 <wm4@nowhere> | 2016-12-23 18:03:16 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-12-23 18:10:07 +0100 |
commit | c560f6ff0ab9aec70e53a268e2ff388a85ec3ca0 (patch) | |
tree | 04e7afab982139d2351f00814be7ee127d5290dc /common/codecs.c | |
parent | 17d6ba7f776d6fd0ebc7a9881a999299c3fa9471 (diff) | |
download | mpv-c560f6ff0ab9aec70e53a268e2ff388a85ec3ca0.tar.bz2 mpv-c560f6ff0ab9aec70e53a268e2ff388a85ec3ca0.tar.xz |
audio: change how spdif codecs are selected
Remove ad_spdif from the normal codec list, and select it explicitly.
One goal was to decouple this from the normal codec selection, so
they're less entangled and the decoder selection code can be simplified
in the far future. This means spdif codec selection is now done
explicitly via select_spdif_codec(). We can also remove the weird
requirements on "dts" and "dts-hd" for the --audio-spdif option, and it
can just do the right thing.
Now both video and audio codecs consist of a single codec family each,
vd_lavc and ad_lavc.
Diffstat (limited to 'common/codecs.c')
-rw-r--r-- | common/codecs.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/common/codecs.c b/common/codecs.c index c0d99eb959..463811066c 100644 --- a/common/codecs.c +++ b/common/codecs.c @@ -130,22 +130,6 @@ struct mp_decoder_list *mp_select_decoders(struct mp_decoder_list *all, return list; } -// selection is a ","-separated list of decoders, all in the given family. -struct mp_decoder_list *mp_select_decoder_list(struct mp_decoder_list *all, - const char *codec, - const char *family, - const char *selection) -{ - struct mp_decoder_list *list = talloc_zero(NULL, struct mp_decoder_list); - bstr sel = bstr0(selection); - while (sel.len) { - bstr decoder; - bstr_split_tok(sel, ",", &decoder, &sel); - add_new(list, find_decoder(all, bstr0(family), decoder), codec); - } - return list; -} - void mp_append_decoders(struct mp_decoder_list *list, struct mp_decoder_list *a) { for (int n = 0; n < a->num_entries; n++) |