avfilter/vf_guided: 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:49:02 +02:00
parent d07ae68a0e
commit a07f84ca00
1 changed files with 1 additions and 6 deletions

View File

@ -127,8 +127,6 @@ static int box_slice(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
return 0;
}
static int query_formats(AVFilterContext *ctx)
{
static const enum AVPixelFormat pix_fmts[] = {
AV_PIX_FMT_YUVA444P, AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV440P,
AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_YUVJ440P,
@ -150,9 +148,6 @@ static int query_formats(AVFilterContext *ctx)
AV_PIX_FMT_NONE
};
return ff_set_common_formats_from_list(ctx, pix_fmts);
}
static int config_input(AVFilterLink *inlink)
{
AVFilterContext *ctx = inlink->dst;
@ -493,7 +488,7 @@ const AVFilter ff_vf_guided = {
.activate = activate,
.inputs = NULL,
FILTER_OUTPUTS(guided_outputs),
FILTER_QUERY_FUNC(query_formats),
FILTER_PIXFMTS_ARRAY(pix_fmts),
.flags = AVFILTER_FLAG_DYNAMIC_INPUTS | AVFILTER_FLAG_SLICE_THREADS |
AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC,
.process_command = process_command,