avfilter/vf_gradfun: Use formats list instead of query function

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
pull/369/head
Andreas Rheinhardt 3 years ago
parent 485c4fb66f
commit 3c7ac4def5
  1. 6
      libavfilter/vf_gradfun.c

@ -145,8 +145,6 @@ static av_cold void uninit(AVFilterContext *ctx)
av_freep(&s->buf);
}
static int query_formats(AVFilterContext *ctx)
{
static const enum AVPixelFormat pix_fmts[] = {
AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUV420P,
AV_PIX_FMT_GRAY8, AV_PIX_FMT_YUV444P,
@ -155,8 +153,6 @@ static int query_formats(AVFilterContext *ctx)
AV_PIX_FMT_GBRP,
AV_PIX_FMT_NONE
};
return ff_set_common_formats_from_list(ctx, pix_fmts);
}
static int config_input(AVFilterLink *inlink)
{
@ -255,6 +251,6 @@ const AVFilter ff_vf_gradfun = {
.uninit = uninit,
FILTER_INPUTS(avfilter_vf_gradfun_inputs),
FILTER_OUTPUTS(avfilter_vf_gradfun_outputs),
FILTER_QUERY_FUNC(query_formats),
FILTER_PIXFMTS_ARRAY(pix_fmts),
.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC,
};

Loading…
Cancel
Save