[FFmpeg-devel] [PATCH 1/2] lavfi/avfiltergraph: suggest a solution when format selection fails.

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


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

Format selection can fail if unknown channel layouts are used
with filters that do not support it.

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


Rebased on top of current head and commit message reworded.


diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c
index 2db2900..3da2d7e 100644
--- a/libavfilter/avfiltergraph.c
+++ b/libavfilter/avfiltergraph.c
@@ -641,6 +641,10 @@ static int pick_format(AVFilterLink *link, AVFilterLink *ref)
             av_log(link->src, AV_LOG_ERROR, "Cannot select channel layout for"
                    " the link between filters %s and %s.\n", link->src->name,
                    link->dst->name);
+            if (!link->in_channel_layouts->all_counts)
+                av_log(link->src, AV_LOG_ERROR, "Unknown channel layouts not "
+                       "supported, try specifying a channel layout using "
+                       "'aformat=channel_layouts=something'.\n");
             return AVERROR(EINVAL);
         }
         link->in_channel_layouts->nb_channel_layouts = 1;
-- 
1.8.4.rc3



More information about the ffmpeg-devel mailing list