avfilter/af_aecho: Use formats list instead of query function
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
5f39512dee
commit
920c2fc9b1
|
@ -152,24 +152,6 @@ static av_cold int init(AVFilterContext *ctx)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int query_formats(AVFilterContext *ctx)
|
|
||||||
{
|
|
||||||
static const enum AVSampleFormat sample_fmts[] = {
|
|
||||||
AV_SAMPLE_FMT_S16P, AV_SAMPLE_FMT_S32P,
|
|
||||||
AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_DBLP,
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
#define MOD(a, b) (((a) >= (b)) ? (a) - (b) : (a))
|
#define MOD(a, b) (((a) >= (b)) ? (a) - (b) : (a))
|
||||||
|
|
||||||
#define ECHO(name, type, min, max) \
|
#define ECHO(name, type, min, max) \
|
||||||
|
@ -371,5 +353,6 @@ const AVFilter ff_af_aecho = {
|
||||||
.uninit = uninit,
|
.uninit = uninit,
|
||||||
FILTER_INPUTS(aecho_inputs),
|
FILTER_INPUTS(aecho_inputs),
|
||||||
FILTER_OUTPUTS(aecho_outputs),
|
FILTER_OUTPUTS(aecho_outputs),
|
||||||
FILTER_QUERY_FUNC(query_formats),
|
FILTER_SAMPLEFMTS(AV_SAMPLE_FMT_S16P, AV_SAMPLE_FMT_S32P,
|
||||||
|
AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_DBLP),
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue