lavfi/vf_mix: switch to query_func2()

This commit is contained in:
Anton Khirnov 2024-10-12 18:28:12 +02:00
parent 4b2580c184
commit 271ec2ab28
1 changed files with 7 additions and 4 deletions

View File

@ -64,7 +64,9 @@ typedef struct MixContext {
FFFrameSync fs;
} MixContext;
static int query_formats(AVFilterContext *ctx)
static int query_formats(const AVFilterContext *ctx,
AVFilterFormatsConfig **cfg_in,
AVFilterFormatsConfig **cfg_out)
{
unsigned reject_flags = AV_PIX_FMT_FLAG_BITSTREAM |
AV_PIX_FMT_FLAG_HWACCEL |
@ -76,7 +78,8 @@ static int query_formats(AVFilterContext *ctx)
else
accept_flags |= AV_PIX_FMT_FLAG_BE;
return ff_set_common_formats(ctx, ff_formats_pixdesc_filter(accept_flags, reject_flags));
return ff_set_common_formats2(ctx, cfg_in, cfg_out,
ff_formats_pixdesc_filter(accept_flags, reject_flags));
}
static int parse_weights(AVFilterContext *ctx)
@ -462,7 +465,7 @@ const AVFilter ff_vf_mix = {
.priv_size = sizeof(MixContext),
.priv_class = &mix_class,
FILTER_OUTPUTS(outputs),
FILTER_QUERY_FUNC(query_formats),
FILTER_QUERY_FUNC2(query_formats),
.init = init,
.uninit = uninit,
.activate = activate,
@ -547,7 +550,7 @@ const AVFilter ff_vf_tmix = {
.priv_class = &tmix_class,
FILTER_OUTPUTS(outputs),
FILTER_INPUTS(inputs),
FILTER_QUERY_FUNC(query_formats),
FILTER_QUERY_FUNC2(query_formats),
.init = init,
.uninit = uninit,
.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS,