diff mbox series

[FFmpeg-devel,12/39] avfilter/f_perms: Deduplicate AVClasses

Message ID AM7PR03MB666090E4936B4265374573BA8FD79@AM7PR03MB6660.eurprd03.prod.outlook.com
State Accepted
Commit 8435cf2307ce7c79f43767fe16195458b1c74622
Headers show
Series [FFmpeg-devel,01/39] avfilter/vf_maskedminmax: Simplify init | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Andreas Rheinhardt Sept. 11, 2021, 11:40 p.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavfilter/f_perms.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

Comments

Paul B Mahol Sept. 18, 2021, 10:59 a.m. UTC | #1
lgtm
diff mbox series

Patch

diff --git a/libavfilter/f_perms.c b/libavfilter/f_perms.c
index 8c449fbdfc..470db45bee 100644
--- a/libavfilter/f_perms.c
+++ b/libavfilter/f_perms.c
@@ -111,10 +111,9 @@  static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
     return ret;
 }
 
-#if CONFIG_APERMS_FILTER
+AVFILTER_DEFINE_CLASS_EXT(perms, "(a)perms", options);
 
-#define aperms_options options
-AVFILTER_DEFINE_CLASS(aperms);
+#if CONFIG_APERMS_FILTER
 
 static const AVFilterPad aperms_inputs[] = {
     {
@@ -134,20 +133,17 @@  static const AVFilterPad aperms_outputs[] = {
 const AVFilter ff_af_aperms = {
     .name        = "aperms",
     .description = NULL_IF_CONFIG_SMALL("Set permissions for the output audio frame."),
+    .priv_class  = &perms_class,
     .init        = init,
     .priv_size   = sizeof(PermsContext),
     FILTER_INPUTS(aperms_inputs),
     FILTER_OUTPUTS(aperms_outputs),
-    .priv_class  = &aperms_class,
     .flags       = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC,
 };
 #endif /* CONFIG_APERMS_FILTER */
 
 #if CONFIG_PERMS_FILTER
 
-#define perms_options options
-AVFILTER_DEFINE_CLASS(perms);
-
 static const AVFilterPad perms_inputs[] = {
     {
         .name         = "default",