On Sat, Oct 10, 2015 at 09:34:21AM -0400, Ganesh Ajjanagadde wrote:
[...]
> diff --git a/libavfilter/vsrc_life.c b/libavfilter/vsrc_life.c
> index 314746d..0e31ef7 100644
> --- a/libavfilter/vsrc_life.c
> +++ b/libavfilter/vsrc_life.c
> @@ -417,6 +417,7 @@ static int query_formats(AVFilterContext *ctx)
>      LifeContext *life = ctx->priv;
>      enum AVPixelFormat pix_fmts[] = { AV_PIX_FMT_NONE, AV_PIX_FMT_NONE };
>      AVFilterFormats *fmts_list;
> +    int ret;
>  
>      if (life->mold || memcmp(life-> life_color, "\xff\xff\xff", 3)
>                     || memcmp(life->death_color, "\x00\x00\x00", 3)) {
> @@ -428,10 +429,7 @@ static int query_formats(AVFilterContext *ctx)
>      }
>  
>      fmts_list = ff_make_format_list(pix_fmts);
> -    if (!fmts_list)
> -        return AVERROR(ENOMEM);
> -    ff_set_common_formats(ctx, fmts_list);
> -    return 0;
> +    return ff_set_common_formats(ctx, fmts_list);

if ff_make_format_list() fails, fmts_list will be NULL and
ff_set_common_formats() will return AVERROR_BUG instead of AVERROR(ENOMEM)

You could change that last function to return AVERROR(ENOMEM) in case a
parameter is NULL, but that's weird semantic.

[...]

-- 
Clément B.

Attachment: signature.asc
Description: PGP signature

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to