diff options
Diffstat (limited to 'libavfilter/vf_crop.c')
-rw-r--r-- | libavfilter/vf_crop.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libavfilter/vf_crop.c b/libavfilter/vf_crop.c index b695a6ffe1..93a58da480 100644 --- a/libavfilter/vf_crop.c +++ b/libavfilter/vf_crop.c @@ -93,13 +93,14 @@ typedef struct CropContext { 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_HWACCEL | AV_PIX_FMT_FLAG_BITSTREAM)) && - !((desc->log2_chroma_w || desc->log2_chroma_h) && !(desc->flags & AV_PIX_FMT_FLAG_PLANAR))) - ff_add_format(&formats, fmt); + !((desc->log2_chroma_w || desc->log2_chroma_h) && !(desc->flags & AV_PIX_FMT_FLAG_PLANAR)) && + (ret = ff_add_format(&formats, fmt)) < 0) + return ret; } return ff_set_common_formats(ctx, formats); |