diff --git a/libavfilter/vf_find_rect.c b/libavfilter/vf_find_rect.c index 32d9a8a67a..6ac714ce45 100644 --- a/libavfilter/vf_find_rect.c +++ b/libavfilter/vf_find_rect.c @@ -59,17 +59,6 @@ static const AVOption find_rect_options[] = { AVFILTER_DEFINE_CLASS(find_rect); -static int query_formats(AVFilterContext *ctx) -{ - static const enum AVPixelFormat pix_fmts[] = { - AV_PIX_FMT_YUV420P, - AV_PIX_FMT_YUVJ420P, - AV_PIX_FMT_NONE - }; - - return ff_set_common_formats_from_list(ctx, pix_fmts); -} - static AVFrame *downscale(AVFrame *in) { int x, y; @@ -307,6 +296,6 @@ const AVFilter ff_vf_find_rect = { .uninit = uninit, FILTER_INPUTS(foc_inputs), FILTER_OUTPUTS(foc_outputs), - FILTER_QUERY_FUNC(query_formats), + FILTER_PIXFMTS(AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUVJ420P), .priv_class = &find_rect_class, };