History

avfilter/af_atilt: Use formats list instead of query function

Andreas Rheinhardt committed 5 years ago

Commit 2329c331 parent b8f74ee1 file · +1 −20Browse files

Unified · Split

libavfilter/af_atilt.c+1−20
@@ -47,25 +47,6 @@ typedef struct ATiltContext { · 46 unmodified lines
4747 int (*filter_channels)(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs);
4848 } ATiltContext;
4949
50−static int query_formats(AVFilterContext *ctx)
51−{
52− static const enum AVSampleFormat sample_fmts[] = {
53− AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_DBLP,
54− AV_SAMPLE_FMT_NONE
55− };
56− int ret;
57−
58− ret = ff_set_common_formats_from_list(ctx, sample_fmts);
59− if (ret < 0)
60− return ret;
61−
62− ret = ff_set_common_all_channel_counts(ctx);
63− if (ret < 0)
64− return ret;
65−
66− return ff_set_common_all_samplerates(ctx);
67−}
68−
6950 static double prewarp(double w, double T, double wp)
7051 {
7152 return wp * tan(w * T * 0.5) / tan(wp * T * 0.5);
@@ -280,7 +261,7 @@ AVFilter ff_af_atilt = { · 208 unmodified lines
280261 .uninit = uninit,
281262 FILTER_INPUTS(inputs),
282263 FILTER_OUTPUTS(outputs),
283− FILTER_QUERY_FUNC(query_formats),
264+ FILTER_SAMPLEFMTS(AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_DBLP),
284265 .process_command = process_command,
285266 .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC |
286267 AVFILTER_FLAG_SLICE_THREADS,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t