History

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

Andreas Rheinhardt committed 5 years ago

Commit 0e42f121 parent 5c36cb21 file · +1 −19Browse files

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

Unified · Split

libavfilter/af_agate.c+1−19
@@ -188,24 +188,6 @@ static void gate(AudioGateContext *s, · 187 unmodified lines
188188
189189 #if CONFIG_AGATE_FILTER
190190
191−static int query_formats(AVFilterContext *ctx)
192−{
193− AVFilterFormats *formats = NULL;
194− int ret;
195−
196− if ((ret = ff_add_format(&formats, AV_SAMPLE_FMT_DBL)) < 0)
197− return ret;
198− ret = ff_set_common_formats(ctx, formats);
199− if (ret < 0)
200− return ret;
201−
202− ret = ff_set_common_all_channel_counts(ctx);
203− if (ret < 0)
204− return ret;
205−
206− return ff_set_common_all_samplerates(ctx);
207−}
208−
209191 static int filter_frame(AVFilterLink *inlink, AVFrame *in)
210192 {
211193 const double *src = (const double *)in->data[0];
@@ -258,7 +240,7 @@ const AVFilter ff_af_agate = { · 46 unmodified lines
258240 .priv_size = sizeof(AudioGateContext),
259241 FILTER_INPUTS(inputs),
260242 FILTER_OUTPUTS(outputs),
261− FILTER_QUERY_FUNC(query_formats),
243+ FILTER_SINGLE_SAMPLEFMT(AV_SAMPLE_FMT_DBL),
262244 .process_command = ff_filter_process_command,
263245 .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC,
264246 };

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