[FFmpeg-cvslog] avfilter/af_ladspa: add special case for 2:2 plugins
Paul B Mahol
git at videolan.org
Tue Sep 8 20:45:53 CEST 2015
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Tue Sep 8 18:33:02 2015 +0000| [31c9660b0fab8a0d95429e3fb11e7832c7960a17] | committer: Paul B Mahol
avfilter/af_ladspa: add special case for 2:2 plugins
Signed-off-by: Paul B Mahol <onemda at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=31c9660b0fab8a0d95429e3fb11e7832c7960a17
---
libavfilter/af_ladspa.c | 8 ++++++++
1 file changed, 8 insertions(+)
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];
More information about the ffmpeg-cvslog
mailing list