lavfi/vf_edgedetect: switch to query_func2()

pull/153/merge
Anton Khirnov 3 months ago
parent 87a619c549
commit f59c1b8a0c
  1. 8
      libavfilter/vf_edgedetect.c

@ -97,7 +97,9 @@ static av_cold int init(AVFilterContext *ctx)
return 0; 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; const EdgeDetectContext *edgedetect = ctx->priv;
static const enum AVPixelFormat wires_pix_fmts[] = {AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE}; 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 { } else {
av_assert0(0); 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) static int config_props(AVFilterLink *inlink)
@ -258,7 +260,7 @@ const AVFilter ff_vf_edgedetect = {
.uninit = uninit, .uninit = uninit,
FILTER_INPUTS(edgedetect_inputs), FILTER_INPUTS(edgedetect_inputs),
FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_OUTPUTS(ff_video_default_filterpad),
FILTER_QUERY_FUNC(query_formats), FILTER_QUERY_FUNC2(query_formats),
.priv_class = &edgedetect_class, .priv_class = &edgedetect_class,
.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC,
}; };

Loading…
Cancel
Save