History

avfilter/af_amix: Use formats list instead of query function

Andreas Rheinhardt committed 5 years ago

Commit ade39d51 parent d6bf8681 file · +2 −17Browse files

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

Unified · Split

libavfilter/af_amix.c+2−17
@@ -589,22 +589,6 @@ static av_cold void uninit(AVFilterContext *ctx) · 588 unmodified lines
589 av_freep(&s->fdsp);589 av_freep(&s->fdsp);
590}590}
591 591
592static int query_formats(AVFilterContext *ctx)
593{
594 static const enum AVSampleFormat sample_fmts[] = {
595 AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_FLTP,
596 AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_DBLP,
597 AV_SAMPLE_FMT_NONE
598 };
599 int ret;
600
601 if ((ret = ff_set_common_formats_from_list(ctx, sample_fmts)) < 0 ||
602 (ret = ff_set_common_all_samplerates(ctx)) < 0)
603 return ret;
604
605 return ff_set_common_all_channel_counts(ctx);
606}
607
608static int process_command(AVFilterContext *ctx, const char *cmd, const char *args,592static int process_command(AVFilterContext *ctx, const char *cmd, const char *args,
609 char *res, int res_len, int flags)593 char *res, int res_len, int flags)
610{594{
@@ -641,7 +625,8 @@ const AVFilter ff_af_amix = { · 30 unmodified lines
641 .activate = activate,625 .activate = activate,
642 .inputs = NULL,626 .inputs = NULL,
643 FILTER_OUTPUTS(avfilter_af_amix_outputs),627 FILTER_OUTPUTS(avfilter_af_amix_outputs),
644 FILTER_QUERY_FUNC(query_formats),628 FILTER_SAMPLEFMTS(AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_FLTP,
629 AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_DBLP),
645 .process_command = process_command,630 .process_command = process_command,
646 .flags = AVFILTER_FLAG_DYNAMIC_INPUTS,631 .flags = AVFILTER_FLAG_DYNAMIC_INPUTS,
647};632};

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