diff options
author | Nicolas George <nicolas.george@normalesup.org> | 2013-09-03 22:12:54 +0200 |
---|---|---|
committer | Nicolas George <george@nsup.org> | 2013-11-03 10:30:08 +0100 |
commit | f775eb3fb4c7b716107355e428e40cb63f71ee7a (patch) | |
tree | 589b8845bf8f9cafb2bf6565c3aab7de5367b8b1 | |
parent | 863fb11f63f7f60feec390f3c54dd13606e07d05 (diff) | |
download | ffmpeg-f775eb3fb4c7b716107355e428e40cb63f71ee7a.tar.gz |
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.
-rw-r--r-- | libavfilter/avfiltergraph.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c index 506d79ec71..bcdcde06ce 100644 --- a/libavfilter/avfiltergraph.c +++ b/libavfilter/avfiltergraph.c @@ -654,6 +654,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; |