[FFmpeg-devel] [PATCH 2/3] lavfi/af_amerge: return EAGAIN if the input layouts are not known.

Stefano Sabatini stefasab at gmail.com
Sat Mar 23 01:31:07 CET 2013


On date Thursday 2013-02-21 20:44:14 +0100, Nicolas George encoded:
> Also downgrade the error to a warning.
> 
> Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
> ---
>  libavfilter/af_amerge.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> 
> Note: a smarter version of query_formats would set the supported input
> layouts, and all supported formats and sample rates, but that would require
> some rework, and there are other points I want to rework too (such a
> supporting unknown layouts).
> 
> 
> diff --git a/libavfilter/af_amerge.c b/libavfilter/af_amerge.c
> index 85ae8d4..9d40e8b 100644
> --- a/libavfilter/af_amerge.c
> +++ b/libavfilter/af_amerge.c
> @@ -81,9 +81,9 @@ static int query_formats(AVFilterContext *ctx)
>      for (i = 0; i < am->nb_inputs; i++) {
>          if (!ctx->inputs[i]->in_channel_layouts ||
>              !ctx->inputs[i]->in_channel_layouts->nb_channel_layouts) {
> -            av_log(ctx, AV_LOG_ERROR,
> +            av_log(ctx, AV_LOG_WARNING,
>                     "No channel layout for input %d\n", i + 1);
> -            return AVERROR(EINVAL);
> +            return AVERROR(EAGAIN);
>          }
>          inlayout[i] = ctx->inputs[i]->in_channel_layouts->channel_layouts[0];
>          if (ctx->inputs[i]->in_channel_layouts->nb_channel_layouts > 1) {

Looks good, assuming patch #3 is approved, thanks.
-- 
FFmpeg = Forgiving and Foolish Magnificient Portable Erroneous Generator


More information about the ffmpeg-devel mailing list