diff --git a/libavfilter/vf_crop.c b/libavfilter/vf_crop.c index 30ee077436..a2f029a2f7 100644 --- a/libavfilter/vf_crop.c +++ b/libavfilter/vf_crop.c @@ -95,7 +95,7 @@ static int query_formats(AVFilterContext *ctx) AVFilterFormats *formats = NULL; int fmt; - for (fmt = 0; fmt < AV_PIX_FMT_NB; fmt++) { + 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)))