[FFmpeg-devel] [PATCH 1/2] lavfi/avfiltergraph: suggest a solution when format selection fails.
michaelni at gmx.at
Wed Sep 4 04:19:50 CEST 2013
On Tue, Sep 03, 2013 at 10:16:42PM +0200, Nicolas George wrote:
> Format selection can fail if the channel layout is not known
> but some filter do not support that.
This sounds quite odd to me
> Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
> libavfilter/avfiltergraph.c | 4 ++++
> 1 file changed, 4 insertions(+)
> diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c
> index fb78a87..e0cb4aa 100644
> --- a/libavfilter/avfiltergraph.c
> +++ b/libavfilter/avfiltergraph.c
> @@ -637,6 +637,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,
> + 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);
should be ok
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Rewriting code that is poorly written but fully understood is good.
Rewriting code that one doesnt understand is a sign that one is less smart
then the original author, trying to rewrite it will not make it better.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: Digital signature
More information about the ffmpeg-devel