From 57bc79e76ac51cd3db8cf7041fe66500826704cd Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Fri, 10 Sep 2021 23:00:37 +0200 Subject: [PATCH] avfilter/vf_stack: Deduplicate AVClasses Signed-off-by: Andreas Rheinhardt --- libavfilter/vf_stack.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/libavfilter/vf_stack.c b/libavfilter/vf_stack.c index a87cffc491..3afcdfda87 100644 --- a/libavfilter/vf_stack.c +++ b/libavfilter/vf_stack.c @@ -390,6 +390,8 @@ static const AVOption stack_options[] = { { NULL }, }; +AVFILTER_DEFINE_CLASS_EXT(stack, "(h|v)stack", stack_options); + static const AVFilterPad outputs[] = { { .name = "default", @@ -400,14 +402,11 @@ static const AVFilterPad outputs[] = { #if CONFIG_HSTACK_FILTER -#define hstack_options stack_options -AVFILTER_DEFINE_CLASS(hstack); - const AVFilter ff_vf_hstack = { .name = "hstack", .description = NULL_IF_CONFIG_SMALL("Stack video inputs horizontally."), + .priv_class = &stack_class, .priv_size = sizeof(StackContext), - .priv_class = &hstack_class, .query_formats = query_formats, FILTER_OUTPUTS(outputs), .init = init, @@ -420,14 +419,11 @@ const AVFilter ff_vf_hstack = { #if CONFIG_VSTACK_FILTER -#define vstack_options stack_options -AVFILTER_DEFINE_CLASS(vstack); - const AVFilter ff_vf_vstack = { .name = "vstack", .description = NULL_IF_CONFIG_SMALL("Stack video inputs vertically."), + .priv_class = &stack_class, .priv_size = sizeof(StackContext), - .priv_class = &vstack_class, .query_formats = query_formats, FILTER_OUTPUTS(outputs), .init = init,