Commit f775eb3f authored by Nicolas George's avatar Nicolas George Committed by Nicolas George

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.
parent 863fb11f
...@@ -654,6 +654,10 @@ static int pick_format(AVFilterLink *link, AVFilterLink *ref) ...@@ -654,6 +654,10 @@ static int pick_format(AVFilterLink *link, AVFilterLink *ref)
av_log(link->src, AV_LOG_ERROR, "Cannot select channel layout for" av_log(link->src, AV_LOG_ERROR, "Cannot select channel layout for"
" the link between filters %s and %s.\n", link->src->name, " the link between filters %s and %s.\n", link->src->name,
link->dst->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); return AVERROR(EINVAL);
} }
link->in_channel_layouts->nb_channel_layouts = 1; link->in_channel_layouts->nb_channel_layouts = 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment