[FFmpeg-cvslog] avfilter/af_ladspa: set output channel layout for passthrough case

Paul B Mahol git at videolan.org
Fri Sep 27 15:05:20 CEST 2013


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Fri Sep 27 08:51:43 2013 +0000| [191ee4aefbde03a9f751321170c01c736f8bb084] | committer: Paul B Mahol

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 at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=191ee4aefbde03a9f751321170c01c736f8bb084
---

 libavfilter/af_ladspa.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/libavfilter/af_ladspa.c b/libavfilter/af_ladspa.c
index 3ceb91e..7578a38 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;



More information about the ffmpeg-cvslog mailing list