mirror of
https://github.com/librempeg/librempeg
synced 2024-11-23 03:28:27 +00:00
avfilter/af_sidechaincompress: Store format in filter, remove query func
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
88a92cb754
commit
174e7f8509
@ -406,23 +406,6 @@ static int acompressor_filter_frame(AVFilterLink *inlink, AVFrame *in)
|
|||||||
return ff_filter_frame(outlink, out);
|
return ff_filter_frame(outlink, out);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int acompressor_query_formats(AVFilterContext *ctx)
|
|
||||||
{
|
|
||||||
static const enum AVSampleFormat sample_fmts[] = {
|
|
||||||
AV_SAMPLE_FMT_DBL,
|
|
||||||
AV_SAMPLE_FMT_NONE
|
|
||||||
};
|
|
||||||
int ret = ff_set_common_all_channel_counts(ctx);
|
|
||||||
if (ret < 0)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
ret = ff_set_common_formats_from_list(ctx, sample_fmts);
|
|
||||||
if (ret < 0)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
return ff_set_common_all_samplerates(ctx);
|
|
||||||
}
|
|
||||||
|
|
||||||
static const AVFilterPad acompressor_inputs[] = {
|
static const AVFilterPad acompressor_inputs[] = {
|
||||||
{
|
{
|
||||||
.name = "default",
|
.name = "default",
|
||||||
@ -446,7 +429,7 @@ const AVFilter ff_af_acompressor = {
|
|||||||
.priv_size = sizeof(SidechainCompressContext),
|
.priv_size = sizeof(SidechainCompressContext),
|
||||||
FILTER_INPUTS(acompressor_inputs),
|
FILTER_INPUTS(acompressor_inputs),
|
||||||
FILTER_OUTPUTS(acompressor_outputs),
|
FILTER_OUTPUTS(acompressor_outputs),
|
||||||
FILTER_QUERY_FUNC(acompressor_query_formats),
|
FILTER_SINGLE_SAMPLEFMT(AV_SAMPLE_FMT_DBL),
|
||||||
.process_command = process_command,
|
.process_command = process_command,
|
||||||
};
|
};
|
||||||
#endif /* CONFIG_ACOMPRESSOR_FILTER */
|
#endif /* CONFIG_ACOMPRESSOR_FILTER */
|
||||||
|
Loading…
Reference in New Issue
Block a user