mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
lavfi/vf_stack: convert to query_func2()
This commit is contained in:
parent
e2f4c69779
commit
bdaaddb65c
@ -63,18 +63,22 @@ typedef struct StackContext {
|
||||
FFFrameSync fs;
|
||||
} StackContext;
|
||||
|
||||
static int query_formats(AVFilterContext *ctx)
|
||||
static int query_formats(const AVFilterContext *ctx,
|
||||
AVFilterFormatsConfig **cfg_in,
|
||||
AVFilterFormatsConfig **cfg_out)
|
||||
{
|
||||
StackContext *s = ctx->priv;
|
||||
const StackContext *s = ctx->priv;
|
||||
int reject_flags = AV_PIX_FMT_FLAG_BITSTREAM |
|
||||
AV_PIX_FMT_FLAG_HWACCEL |
|
||||
AV_PIX_FMT_FLAG_PAL;
|
||||
|
||||
if (s->fillcolor_enable) {
|
||||
return ff_set_common_formats(ctx, ff_draw_supported_pixel_formats(0));
|
||||
return ff_set_common_formats2(ctx, cfg_in, cfg_out,
|
||||
ff_draw_supported_pixel_formats(0));
|
||||
}
|
||||
|
||||
return ff_set_common_formats(ctx, ff_formats_pixdesc_filter(0, reject_flags));
|
||||
return ff_set_common_formats2(ctx, cfg_in, cfg_out,
|
||||
ff_formats_pixdesc_filter(0, reject_flags));
|
||||
}
|
||||
|
||||
static av_cold int init(AVFilterContext *ctx)
|
||||
@ -462,7 +466,7 @@ const AVFilter ff_vf_hstack = {
|
||||
.priv_class = &stack_class,
|
||||
.priv_size = sizeof(StackContext),
|
||||
FILTER_OUTPUTS(outputs),
|
||||
FILTER_QUERY_FUNC(query_formats),
|
||||
FILTER_QUERY_FUNC2(query_formats),
|
||||
.init = init,
|
||||
.uninit = uninit,
|
||||
.activate = activate,
|
||||
@ -479,7 +483,7 @@ const AVFilter ff_vf_vstack = {
|
||||
.priv_class = &stack_class,
|
||||
.priv_size = sizeof(StackContext),
|
||||
FILTER_OUTPUTS(outputs),
|
||||
FILTER_QUERY_FUNC(query_formats),
|
||||
FILTER_QUERY_FUNC2(query_formats),
|
||||
.init = init,
|
||||
.uninit = uninit,
|
||||
.activate = activate,
|
||||
@ -507,7 +511,7 @@ const AVFilter ff_vf_xstack = {
|
||||
.priv_size = sizeof(StackContext),
|
||||
.priv_class = &xstack_class,
|
||||
FILTER_OUTPUTS(outputs),
|
||||
FILTER_QUERY_FUNC(query_formats),
|
||||
FILTER_QUERY_FUNC2(query_formats),
|
||||
.init = init,
|
||||
.uninit = uninit,
|
||||
.activate = activate,
|
||||
|
Loading…
Reference in New Issue
Block a user