History

avfilter/af_asoftclip: Use formats list instead of query function

Andreas Rheinhardt committed 5 years ago

Commit 6176aee1 parent 55c7ee91 file · +1 −18Browse files

Unified · Split

libavfilter/af_asoftclip.c+1−18
@@ -88,23 +88,6 @@ static const AVOption asoftclip_options[] = { · 87 unmodified lines
88 88
89AVFILTER_DEFINE_CLASS(asoftclip);89AVFILTER_DEFINE_CLASS(asoftclip);
90 90
91static int query_formats(AVFilterContext *ctx)
92{
93 static const enum AVSampleFormat sample_fmts[] = {
94 AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_DBLP,
95 AV_SAMPLE_FMT_NONE
96 };
97 int ret = ff_set_common_formats_from_list(ctx, sample_fmts);
98 if (ret < 0)
99 return ret;
100
101 ret = ff_set_common_all_channel_counts(ctx);
102 if (ret < 0)
103 return ret;
104
105 return ff_set_common_all_samplerates(ctx);
106}
107
108static void get_lowpass(Lowpass *s,91static void get_lowpass(Lowpass *s,
109 double frequency,92 double frequency,
110 double sample_rate)93 double sample_rate)
@@ -504,7 +487,7 @@ const AVFilter ff_af_asoftclip = { · 393 unmodified lines
504 .priv_class = &asoftclip_class,487 .priv_class = &asoftclip_class,
505 FILTER_INPUTS(inputs),488 FILTER_INPUTS(inputs),
506 FILTER_OUTPUTS(outputs),489 FILTER_OUTPUTS(outputs),
507 FILTER_QUERY_FUNC(query_formats),490 FILTER_SAMPLEFMTS(AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_DBLP),
508 .uninit = uninit,491 .uninit = uninit,
509 .process_command = ff_filter_process_command,492 .process_command = ff_filter_process_command,
510 .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC |493 .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC |

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