History

lavfi/af_arls: convert to query_func2()

Also, drop redundant calls that also happen implicitly in generic code.

Anton Khirnov committed 2 years ago

Commit dfaa3391 parent 814c9611 file · +8 −8Browse files

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

Unified · Split

libavfilter/af_arls.c+8−8
@@ -84,9 +84,11 @@ static const AVOption arls_options[] = { · 83 unmodified lines
8484
8585 AVFILTER_DEFINE_CLASS(arls);
8686
87−static int query_formats(AVFilterContext *ctx)
87+static int query_formats(const AVFilterContext *ctx,
88+ AVFilterFormatsConfig **cfg_in,
89+ AVFilterFormatsConfig **cfg_out)
8890 {
89− AudioRLSContext *s = ctx->priv;
91+ const AudioRLSContext *s = ctx->priv;
9092 static const enum AVSampleFormat sample_fmts[3][3] = {
9193 { AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_DBLP, AV_SAMPLE_FMT_NONE },
9294 { AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_NONE },
@@ -94,13 +96,11 @@ static int query_formats(AVFilterContext *ctx) · 1 unmodified line
9496 };
9597 int ret;
9698
97− if ((ret = ff_set_common_all_channel_counts(ctx)) < 0)
98− return ret;
99−
100− if ((ret = ff_set_common_formats_from_list(ctx, sample_fmts[s->precision])) < 0)
99+ if ((ret = ff_set_common_formats_from_list2(ctx, cfg_in, cfg_out,
100+ sample_fmts[s->precision])) < 0)
101101 return ret;
102102
103− return ff_set_common_all_samplerates(ctx);
103+ return 0;
104104 }
105105
106106 static int activate(AVFilterContext *ctx)
@@ -291,7 +291,7 @@ const AVFilter ff_af_arls = { · 184 unmodified lines
291291 .activate = activate,
292292 FILTER_INPUTS(inputs),
293293 FILTER_OUTPUTS(outputs),
294− FILTER_QUERY_FUNC(query_formats),
294+ FILTER_QUERY_FUNC2(query_formats),
295295 .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL |
296296 AVFILTER_FLAG_SLICE_THREADS,
297297 .process_command = ff_filter_process_command,

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