From f59c1b8a0cdc5e2c47f8f01c7f07a6cb53008694 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Fri, 4 Oct 2024 10:09:29 +0200 Subject: [PATCH] lavfi/vf_edgedetect: switch to query_func2() --- libavfilter/vf_edgedetect.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libavfilter/vf_edgedetect.c b/libavfilter/vf_edgedetect.c index 32339a0d8b..1077095fd3 100644 --- a/libavfilter/vf_edgedetect.c +++ b/libavfilter/vf_edgedetect.c @@ -97,7 +97,9 @@ static av_cold int init(AVFilterContext *ctx) return 0; } -static int query_formats(AVFilterContext *ctx) +static int query_formats(const AVFilterContext *ctx, + AVFilterFormatsConfig **cfg_in, + AVFilterFormatsConfig **cfg_out) { const EdgeDetectContext *edgedetect = ctx->priv; static const enum AVPixelFormat wires_pix_fmts[] = {AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE}; @@ -114,7 +116,7 @@ static int query_formats(AVFilterContext *ctx) } else { av_assert0(0); } - return ff_set_common_formats_from_list(ctx, pix_fmts); + return ff_set_common_formats_from_list2(ctx, cfg_in, cfg_out, pix_fmts); } static int config_props(AVFilterLink *inlink) @@ -258,7 +260,7 @@ const AVFilter ff_vf_edgedetect = { .uninit = uninit, FILTER_INPUTS(edgedetect_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), - FILTER_QUERY_FUNC(query_formats), + FILTER_QUERY_FUNC2(query_formats), .priv_class = &edgedetect_class, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, };