History

avfilter/af_apsyclip: Store format in filter, remove query function

Andreas Rheinhardt committed 5 years ago

Commit 55c7ee91 parent 8a588de1 file · +1 −20Browse files

Showing the changes to libavfilter (1 of 1 file). Show all

Unified · Split

libavfilter/af_apsyclip.c+1−20
@@ -80,25 +80,6 @@ static const AVOption apsyclip_options[] = { · 79 unmodified lines
8080
8181 AVFILTER_DEFINE_CLASS(apsyclip);
8282
83−static int query_formats(AVFilterContext *ctx)
84−{
85− static const enum AVSampleFormat sample_fmts[] = {
86− AV_SAMPLE_FMT_FLTP,
87− AV_SAMPLE_FMT_NONE
88− };
89− int ret;
90−
91− ret = ff_set_common_all_channel_counts(ctx);
92− if (ret < 0)
93− return ret;
94−
95− ret = ff_set_common_formats_from_list(ctx, sample_fmts);
96− if (ret < 0)
97− return ret;
98−
99− return ff_set_common_all_samplerates(ctx);
100−}
101−
10283 static void generate_hann_window(float *window, float *inv_window, int size)
10384 {
10485 for (int i = 0; i < size; i++) {
@@ -671,7 +652,7 @@ const AVFilter ff_af_apsyclip = { · 566 unmodified lines
671652 .uninit = uninit,
672653 FILTER_INPUTS(inputs),
673654 FILTER_OUTPUTS(outputs),
674− FILTER_QUERY_FUNC(query_formats),
655+ FILTER_SINGLE_SAMPLEFMT(AV_SAMPLE_FMT_FLTP),
675656 .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL |
676657 AVFILTER_FLAG_SLICE_THREADS,
677658 .activate = activate,

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