avfilter/vf_find_rect: Use formats list instead of query function

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2021-09-27 21:56:23 +02:00
parent 6a8858ef78
commit a8fd45a373

View File

@ -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,
};