diff options
author | Paul B Mahol <onemda@gmail.com> | 2015-09-08 18:33:02 +0000 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2015-09-08 18:33:02 +0000 |
commit | 31c9660b0fab8a0d95429e3fb11e7832c7960a17 (patch) | |
tree | 242b0627897a4c735ccb89d3d6a4d89270ddbba4 /libavfilter/af_ladspa.c | |
parent | 309fb6ba2271157177b1b24f35994d0c5435a85a (diff) | |
download | ffmpeg-31c9660b0fab8a0d95429e3fb11e7832c7960a17.tar.gz |
avfilter/af_ladspa: add special case for 2:2 plugins
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavfilter/af_ladspa.c')
-rw-r--r-- | libavfilter/af_ladspa.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libavfilter/af_ladspa.c b/libavfilter/af_ladspa.c index 2057e6d0ef..144db2ed95 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]; |