History

avfilter/af_afade: Remove redundant checks and assignments

The acrossfade filter uses the ff_set_common_* functions in its query_formats(), so that the formats, the sample rates as well as the channel layouts and counts of all links coincide.

Andreas Rheinhardt committed 5 years ago

Commit 9985ea71 parent ed1a7041 file · +0 −11Browse files

Unified · Split

libavfilter/af_afade.c+0−11
@@ -588,18 +588,7 @@ static int acrossfade_config_output(AVFilterLink *outlink) · 587 unmodified lines
588588 AVFilterContext *ctx = outlink->src;
589589 AudioFadeContext *s = ctx->priv;
590590
591− if (ctx->inputs[0]->sample_rate != ctx->inputs[1]->sample_rate) {
592− av_log(ctx, AV_LOG_ERROR,
593− "Inputs must have the same sample rate "
594− "%d for in0 vs %d for in1\n",
595− ctx->inputs[0]->sample_rate, ctx->inputs[1]->sample_rate);
596− return AVERROR(EINVAL);
597− }
598−
599− outlink->sample_rate = ctx->inputs[0]->sample_rate;
600591 outlink->time_base = ctx->inputs[0]->time_base;
601− outlink->channel_layout = ctx->inputs[0]->channel_layout;
602− outlink->channels = ctx->inputs[0]->channels;
603592
604593 switch (outlink->format) {
605594 case AV_SAMPLE_FMT_DBL: s->crossfade_samples = crossfade_samples_dbl; break;

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