[FFmpeg-cvslog] lavfi/avfiltergraph: suggest a solution when format selection fails.

Nicolas George git at videolan.org
Thu Nov 28 01:36:06 CET 2013


ffmpeg | branch: release/2.0 | Nicolas George <nicolas.george at normalesup.org> | Tue Sep  3 22:12:54 2013 +0200| [62baf22ec085a52a4ccb09cbd20a8d15c8496bdd] | committer: Carl Eugen Hoyos

lavfi/avfiltergraph: suggest a solution when format selection fails.

Format selection can fail if unknown channel layouts are used
with filters that do not support it.
(cherry picked from commit f775eb3fb4c7b716107355e428e40cb63f71ee7a)

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

 libavfilter/avfiltergraph.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c
index 8c40002..444a1a1 100644
--- a/libavfilter/avfiltergraph.c
+++ b/libavfilter/avfiltergraph.c
@@ -575,6 +575,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;



More information about the ffmpeg-cvslog mailing list