summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2015-09-08 18:33:02 +0000
committerPaul B Mahol <onemda@gmail.com>2015-09-08 18:33:02 +0000
commit31c9660b0fab8a0d95429e3fb11e7832c7960a17 (patch)
tree242b0627897a4c735ccb89d3d6a4d89270ddbba4
parent309fb6ba2271157177b1b24f35994d0c5435a85a (diff)
downloadffmpeg-streaming-31c9660b0fab8a0d95429e3fb11e7832c7960a17.zip
ffmpeg-streaming-31c9660b0fab8a0d95429e3fb11e7832c7960a17.tar.gz
avfilter/af_ladspa: add special case for 2:2 plugins
Signed-off-by: Paul B Mahol <onemda@gmail.com>
-rw-r--r--libavfilter/af_ladspa.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libavfilter/af_ladspa.c b/libavfilter/af_ladspa.c
index 2057e6d..144db2e 100644
--- a/libavfilter/af_ladspa.c
+++ b/libavfilter/af_ladspa.c
@@ -303,6 +303,10 @@ static int config_output(AVFilterLink *outlink)
outlink->format = inlink->format;
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;
} else {
@@ -613,6 +617,10 @@ static int query_formats(AVFilterContext *ctx)
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);
} else {
AVFilterLink *outlink = ctx->outputs[0];
OpenPOWER on IntegriCloud