1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

lavfi/vf_swapuv: convert to query_func2()

This commit is contained in:
Anton Khirnov 2024-10-15 11:24:35 +02:00
parent 06292d34de
commit a18418f39d

View File

@ -67,7 +67,9 @@ static int is_planar_yuv(const AVPixFmtDescriptor *desc)
return 1;
}
static int query_formats(AVFilterContext *ctx)
static int query_formats(const AVFilterContext *ctx,
AVFilterFormatsConfig **cfg_in,
AVFilterFormatsConfig **cfg_out)
{
AVFilterFormats *formats = NULL;
int fmt, ret;
@ -78,7 +80,7 @@ static int query_formats(AVFilterContext *ctx)
return ret;
}
return ff_set_common_formats(ctx, formats);
return ff_set_common_formats2(ctx, cfg_in, cfg_out, formats);
}
static const AVFilterPad swapuv_inputs[] = {
@ -95,6 +97,6 @@ const AVFilter ff_vf_swapuv = {
.description = NULL_IF_CONFIG_SMALL("Swap U and V components."),
FILTER_INPUTS(swapuv_inputs),
FILTER_OUTPUTS(ff_video_default_filterpad),
FILTER_QUERY_FUNC(query_formats),
FILTER_QUERY_FUNC2(query_formats),
.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC,
};