filter/LoadChain: use the AutoConvertFilter
This adds support for input samples other than 16 bit to the FFmpeg filter plugin.
This commit is contained in:
parent
0c965d0573
commit
2da3cff1e8
1
NEWS
1
NEWS
@ -4,6 +4,7 @@ ver 0.22.3 (not yet released)
|
||||
* filter
|
||||
- fix garbage after "Audio format not supported by filter" message
|
||||
- ffmpeg: support planar output
|
||||
- ffmpeg: support sample formats other than 16 bit
|
||||
|
||||
ver 0.22.2 (2020/10/28)
|
||||
* database
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user