avfilter/af_ladspa: add special case for 2:2 plugins
Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
parent
309fb6ba22
commit
31c9660b0f
1 changed files with 8 additions and 0 deletions
|
|
@ -303,6 +303,10 @@ static int config_output(AVFilterLink *outlink)
|
||||||
|
|
||||||
outlink->format = inlink->format;
|
outlink->format = inlink->format;
|
||||||
outlink->sample_rate = inlink->sample_rate;
|
outlink->sample_rate = inlink->sample_rate;
|
||||||
|
if (ctx->nb_inputs == ctx->nb_outputs) {
|
||||||
|
outlink->channel_layout = inlink->channel_layout;
|
||||||
|
outlink->channels = inlink->channels;
|
||||||
|
}
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -612,6 +616,10 @@ static int query_formats(AVFilterContext *ctx)
|
||||||
if (!layouts)
|
if (!layouts)
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
|
|
||||||
|
ff_set_common_channel_layouts(ctx, layouts);
|
||||||
|
} else if (s->nb_inputs == 2 && s->nb_outputs == 2) {
|
||||||
|
layouts = NULL;
|
||||||
|
ff_add_channel_layout(&layouts, AV_CH_LAYOUT_STEREO);
|
||||||
ff_set_common_channel_layouts(ctx, layouts);
|
ff_set_common_channel_layouts(ctx, layouts);
|
||||||
} else {
|
} else {
|
||||||
AVFilterLink *outlink = ctx->outputs[0];
|
AVFilterLink *outlink = ctx->outputs[0];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue