[FFmpeg-cvslog] lavfi/vf_setparams: convert to query_func2()
Anton Khirnov
git at videolan.org
Thu Oct 17 12:12:24 EEST 2024
ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Tue Oct 15 11:24:35 2024 +0200| [a96244df77fec557e27aca5d7c9de00cb2414ba3] | committer: Anton Khirnov
lavfi/vf_setparams: convert to query_func2()
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a96244df77fec557e27aca5d7c9de00cb2414ba3
---
libavfilter/vf_setparams.c | 15 ++++++++-------
1 file 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 */
More information about the ffmpeg-cvslog
mailing list