aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2024-10-15 11:24:35 +0200
committerAnton Khirnov <anton@khirnov.net>2024-10-17 11:00:35 +0200
commita96244df77fec557e27aca5d7c9de00cb2414ba3 (patch)
tree0dd2aa1e4907f701a062a5947d5e32f2e3fc3a3f /libavfilter
parent242ee7b0a23fdd116869c0556001f67102d6b049 (diff)
downloadffmpeg-a96244df77fec557e27aca5d7c9de00cb2414ba3.tar.gz
lavfi/vf_setparams: convert to query_func2()
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/vf_setparams.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/libavfilter/vf_setparams.c b/libavfilter/vf_setparams.c
index 14a16477c9..3943fd3c2d 100644
--- a/libavfilter/vf_setparams.c
+++ b/libavfilter/vf_setparams.c
@@ -136,22 +136,23 @@ static const AVOption setparams_options[] = {
AVFILTER_DEFINE_CLASS(setparams);
-static int query_formats(AVFilterContext *ctx)
+static int query_formats(const AVFilterContext *ctx,
+ AVFilterFormatsConfig **cfg_in,
+ AVFilterFormatsConfig **cfg_out)
{
- SetParamsContext *s = ctx->priv;
- AVFilterLink *outlink = ctx->outputs[0];
+ const SetParamsContext *s = ctx->priv;
int ret;
if (s->colorspace >= 0) {
ret = ff_formats_ref(ff_make_formats_list_singleton(s->colorspace),
- &outlink->incfg.color_spaces);
+ &cfg_out[0]->color_spaces);
if (ret < 0)
return ret;
}
if (s->color_range >= 0) {
ret = ff_formats_ref(ff_make_formats_list_singleton(s->color_range),
- &outlink->incfg.color_ranges);
+ &cfg_out[0]->color_ranges);
if (ret < 0)
return ret;
}
@@ -217,7 +218,7 @@ const AVFilter ff_vf_setparams = {
.flags = AVFILTER_FLAG_METADATA_ONLY,
FILTER_INPUTS(inputs),
FILTER_OUTPUTS(ff_video_default_filterpad),
- FILTER_QUERY_FUNC(query_formats),
+ FILTER_QUERY_FUNC2(query_formats),
};
#if CONFIG_SETRANGE_FILTER
@@ -258,7 +259,7 @@ const AVFilter ff_vf_setrange = {
.flags = AVFILTER_FLAG_METADATA_ONLY,
FILTER_INPUTS(inputs),
FILTER_OUTPUTS(ff_video_default_filterpad),
- FILTER_QUERY_FUNC(query_formats),
+ FILTER_QUERY_FUNC2(query_formats),
};
#endif /* CONFIG_SETRANGE_FILTER */