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 f775eb3fb4)
This commit is contained in:
Nicolas George
2013-09-03 22:12:54 +02:00
committed by Carl Eugen Hoyos
parent 8f7d839e15
commit 62baf22ec0
+4
View File
@@ -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;