diff options
author | Max Kellermann <max@musicpd.org> | 2020-11-04 17:07:28 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2020-11-04 20:15:19 +0100 |
commit | 2da3cff1e8a5e1558d47a8493eaa9503b2d56b9e (patch) | |
tree | cd3bb71f1c80e259c748b0f108349f176eccef65 /src/filter | |
parent | 0c965d05734d18b4cfd2e4b5ac1b2a6ca0c6515d (diff) |
filter/LoadChain: use the AutoConvertFilter
This adds support for input samples other than 16 bit to the FFmpeg
filter plugin.
Diffstat (limited to 'src/filter')
-rw-r--r-- | src/filter/LoadChain.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/filter/LoadChain.cxx b/src/filter/LoadChain.cxx index 01c886fce..cca351a72 100644 --- a/src/filter/LoadChain.cxx +++ b/src/filter/LoadChain.cxx @@ -20,6 +20,7 @@ #include "LoadChain.hxx" #include "Factory.hxx" #include "Prepared.hxx" +#include "plugins/AutoConvertFilterPlugin.hxx" #include "plugins/ChainFilterPlugin.hxx" #include "util/IterableSplitString.hxx" @@ -29,11 +30,14 @@ static void filter_chain_append_new(PreparedFilter &chain, FilterFactory &factory, std::string_view template_name) { + /* using the AutoConvert filter just in case the specified + filter plugin does not support the exact input format */ + filter_chain_append(chain, template_name, /* unfortunately, MakeFilter() wants a null-terminated string, so we need to copy it here */ - factory.MakeFilter(std::string(template_name).c_str())); + autoconvert_filter_new(factory.MakeFilter(std::string(template_name).c_str()))); } void |