X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavfilter%2Fvf_hflip.c;h=96ffca880b71c034a421c48246224799e5ccf534;hb=4da52e3630343e8d3a79aef2cafcb6bf0b71e8da;hp=362bd013a974db030d09c96fc794d6719533f48c;hpb=59b55619b6edef363532825c4cf16ac2bfdd21a1;p=ffmpeg diff --git a/libavfilter/vf_hflip.c b/libavfilter/vf_hflip.c index 362bd013a97..96ffca880b7 100644 --- a/libavfilter/vf_hflip.c +++ b/libavfilter/vf_hflip.c @@ -44,15 +44,16 @@ typedef struct FlipContext { 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_BITSTREAM || (desc->log2_chroma_w != desc->log2_chroma_h && - desc->comp[0].plane == desc->comp[1].plane))) - ff_add_format(&pix_fmts, fmt); + desc->comp[0].plane == desc->comp[1].plane)) && + (ret = ff_add_format(&pix_fmts, fmt)) < 0) + return ret; } return ff_set_common_formats(ctx, pix_fmts);