[FFmpeg-devel] [PATCH 2/2] lavfi/avfiltergraph: do not reduce incompatible lists.

Nicolas George george at nsup.org
Fri Oct 25 12:18:20 CEST 2013


From: Nicolas George <nicolas.george at normalesup.org>

A list of "all channel layouts" but not "all channel counts"
can not be reduced to a single unknown channel count.

Signed-off-by: Nicolas George <george at nsup.org>
---
 libavfilter/avfiltergraph.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)


Rebased on top of current head.
This is more or less a prerequisite for fixing trac #2899.
Ping.


diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c
index 3da2d7e..b8fc3bd 100644
--- a/libavfilter/avfiltergraph.c
+++ b/libavfilter/avfiltergraph.c
@@ -728,7 +728,8 @@ static int reduce_formats_on_filter(AVFilterContext *filter)
             if (inlink->type != outlink->type || fmts->nb_channel_layouts == 1)
                 continue;
 
-            if (fmts->all_layouts) {
+            if (fmts->all_layouts &&
+                (!FF_LAYOUT2COUNT(fmt) || fmts->all_counts)) {
                 /* Turn the infinite list into a singleton */
                 fmts->all_layouts = fmts->all_counts  = 0;
                 ff_add_channel_layout(&outlink->in_channel_layouts, fmt);
-- 
1.8.4.rc3



More information about the ffmpeg-devel mailing list