[FFmpeg-cvslog] lavfi/vf_format: switch to query_func2()
Anton Khirnov
git at videolan.org
Mon Oct 7 11:57:54 EEST 2024
ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Fri Oct 4 10:09:29 2024 +0200| [eb0c9670b4a943a43d1eef493c2866e416f32162] | committer: Anton Khirnov
lavfi/vf_format: switch to query_func2()
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=eb0c9670b4a943a43d1eef493c2866e416f32162
---
libavfilter/vf_format.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/libavfilter/vf_format.c b/libavfilter/vf_format.c
index da39625fec..9dbb174c42 100644
--- a/libavfilter/vf_format.c
+++ b/libavfilter/vf_format.c
@@ -149,14 +149,16 @@ 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)
{
FormatContext *s = ctx->priv;
int ret;
- if (s->formats && (ret = ff_set_common_formats(ctx, s->formats)) < 0 ||
- s->color_spaces && (ret = ff_set_common_color_spaces(ctx, s->color_spaces)) < 0 ||
- s->color_ranges && (ret = ff_set_common_color_ranges(ctx, s->color_ranges)) < 0)
+ if (s->formats && (ret = ff_set_common_formats2 (ctx, cfg_in, cfg_out, s->formats)) < 0 ||
+ s->color_spaces && (ret = ff_set_common_color_spaces2(ctx, cfg_in, cfg_out, s->color_spaces)) < 0 ||
+ s->color_ranges && (ret = ff_set_common_color_ranges2(ctx, cfg_in, cfg_out, s->color_ranges)) < 0)
return ret;
return 0;
@@ -197,7 +199,7 @@ const AVFilter ff_vf_format = {
FILTER_INPUTS(inputs),
FILTER_OUTPUTS(ff_video_default_filterpad),
- FILTER_QUERY_FUNC(query_formats),
+ FILTER_QUERY_FUNC2(query_formats),
};
#endif /* CONFIG_FORMAT_FILTER */
@@ -217,6 +219,6 @@ const AVFilter ff_vf_noformat = {
FILTER_INPUTS(inputs),
FILTER_OUTPUTS(ff_video_default_filterpad),
- FILTER_QUERY_FUNC(query_formats),
+ FILTER_QUERY_FUNC2(query_formats),
};
#endif /* CONFIG_NOFORMAT_FILTER */
More information about the ffmpeg-cvslog
mailing list