X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavfilter%2Fvf_il.c;h=7aedb87d892622971591b1b50b99bcd2972f8a9d;hb=bc22cd244e4c04fb304cfc4fcccb650abbd29ef2;hp=d370b5257a3469fc5c1c3b2be2cdcc6d3a6efdd7;hpb=b3bf41cb75d434b2622433a96dcb617a58e9fca6;p=ffmpeg diff --git a/libavfilter/vf_il.c b/libavfilter/vf_il.c index d370b5257a3..7aedb87d892 100644 --- a/libavfilter/vf_il.c +++ b/libavfilter/vf_il.c @@ -84,12 +84,14 @@ AVFILTER_DEFINE_CLASS(il); static int query_formats(AVFilterContext *ctx) { AVFilterFormats *formats = NULL; - int fmt; + int fmt, ret; for (fmt = 0; av_pix_fmt_desc_get(fmt); fmt++) { const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(fmt); - if (!(desc->flags & AV_PIX_FMT_FLAG_PAL) && !(desc->flags & AV_PIX_FMT_FLAG_HWACCEL)) - ff_add_format(&formats, fmt); + if (!(desc->flags & AV_PIX_FMT_FLAG_PAL) && + !(desc->flags & AV_PIX_FMT_FLAG_HWACCEL) && + (ret = ff_add_format(&formats, fmt)) < 0) + return ret; } return ff_set_common_formats(ctx, formats);