X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavfilter%2Fvf_detelecine.c;h=9af2a133ac74c6d8aaa843dd10a994f9d74f25f1;hb=4da52e3630343e8d3a79aef2cafcb6bf0b71e8da;hp=320e90d05262e60c4b3df36b3adc56a6be132ada;hpb=1dd5f3340e002bf923fbfd4774afe3fafc6ad713;p=ffmpeg diff --git a/libavfilter/vf_detelecine.c b/libavfilter/vf_detelecine.c index 320e90d0526..9af2a133ac7 100644 --- a/libavfilter/vf_detelecine.c +++ b/libavfilter/vf_detelecine.c @@ -116,14 +116,15 @@ static av_cold int init(AVFilterContext *ctx) static int query_formats(AVFilterContext *ctx) { AVFilterFormats *pix_fmts = 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_HWACCEL || desc->flags & AV_PIX_FMT_FLAG_PAL || - desc->flags & AV_PIX_FMT_FLAG_BITSTREAM)) - ff_add_format(&pix_fmts, fmt); + desc->flags & AV_PIX_FMT_FLAG_BITSTREAM) && + (ret = ff_add_format(&pix_fmts, fmt)) < 0) + return ret; } return ff_set_common_formats(ctx, pix_fmts);