aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/af_ladspa.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2013-09-27 08:51:43 +0000
committerPaul B Mahol <onemda@gmail.com>2013-09-27 12:51:08 +0000
commit191ee4aefbde03a9f751321170c01c736f8bb084 (patch)
treebf5c8b86a158c2c045aeeb2a7f2e867cb949c694 /libavfilter/af_ladspa.c
parent110a2f446d54541d4e419cf20494223dd6a1a1f9 (diff)
downloadffmpeg-191ee4aefbde03a9f751321170c01c736f8bb084.tar.gz
avfilter/af_ladspa: set output channel layout for passthrough case
For cases when plugin does not return any samples we just return input samples. Previously channel layout for outlink was not set. Set it explicitly instead. Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavfilter/af_ladspa.c')
-rw-r--r--libavfilter/af_ladspa.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libavfilter/af_ladspa.c b/libavfilter/af_ladspa.c
index 3ceb91e739..7578a385ff 100644
--- a/libavfilter/af_ladspa.c
+++ b/libavfilter/af_ladspa.c
@@ -612,6 +612,8 @@ static int query_formats(AVFilterContext *ctx)
ff_set_common_channel_layouts(ctx, layouts);
} else {
+ AVFilterLink *outlink = ctx->outputs[0];
+
if (s->nb_inputs >= 1) {
AVFilterLink *inlink = ctx->inputs[0];
int64_t inlayout = FF_COUNT2LAYOUT(s->nb_inputs);
@@ -619,10 +621,12 @@ static int query_formats(AVFilterContext *ctx)
layouts = NULL;
ff_add_channel_layout(&layouts, inlayout);
ff_channel_layouts_ref(layouts, &inlink->out_channel_layouts);
+
+ if (!s->nb_outputs)
+ ff_channel_layouts_ref(layouts, &outlink->in_channel_layouts);
}
if (s->nb_outputs >= 1) {
- AVFilterLink *outlink = ctx->outputs[0];
int64_t outlayout = FF_COUNT2LAYOUT(s->nb_outputs);
layouts = NULL;