[FFmpeg-cvslog] avfilter/vf_stack: Deduplicate AVClasses

Andreas Rheinhardt git at videolan.org
Sun Sep 19 06:14:14 EEST 2021


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Fri Sep 10 23:00:37 2021 +0200| [57bc79e76ac51cd3db8cf7041fe66500826704cd] | committer: Andreas Rheinhardt

avfilter/vf_stack: Deduplicate AVClasses

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=57bc79e76ac51cd3db8cf7041fe66500826704cd
---

 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,



More information about the ffmpeg-cvslog mailing list