From: "Ronald S. Bultje" <[email protected]>

---
 libavcodec/ac3enc_fixed.c         |    1 +
 libavcodec/ac3enc_float.c         |    1 +
 libavcodec/ac3enc_opts_template.c |    8 +-------
 libavcodec/eac3enc.c              |    1 +
 4 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/libavcodec/ac3enc_fixed.c b/libavcodec/ac3enc_fixed.c
index cc8f158..153f39d 100644
--- a/libavcodec/ac3enc_fixed.c
+++ b/libavcodec/ac3enc_fixed.c
@@ -33,6 +33,7 @@
 #include "eac3enc.h"
 
 #define AC3ENC_TYPE AC3ENC_TYPE_AC3_FIXED
+#define AC3ENC_OPT_TBL_NAME ac3fixed_options
 #include "ac3enc_opts_template.c"
 static const AVClass ac3enc_class = { "Fixed-Point AC-3 Encoder", 
av_default_item_name,
                                       ac3fixed_options, LIBAVUTIL_VERSION_INT 
};
diff --git a/libavcodec/ac3enc_float.c b/libavcodec/ac3enc_float.c
index 9eff5c5..b699c4d 100644
--- a/libavcodec/ac3enc_float.c
+++ b/libavcodec/ac3enc_float.c
@@ -35,6 +35,7 @@
 
 #if CONFIG_AC3_ENCODER
 #define AC3ENC_TYPE AC3ENC_TYPE_AC3
+#define AC3ENC_OPT_TBL_NAME ac3_options
 #include "ac3enc_opts_template.c"
 static const AVClass ac3enc_class = { "AC-3 Encoder", av_default_item_name,
                                       ac3_options, LIBAVUTIL_VERSION_INT };
diff --git a/libavcodec/ac3enc_opts_template.c 
b/libavcodec/ac3enc_opts_template.c
index fa89844..f4bff4b 100644
--- a/libavcodec/ac3enc_opts_template.c
+++ b/libavcodec/ac3enc_opts_template.c
@@ -23,13 +23,7 @@
 #include "internal.h"
 #include "ac3.h"
 
-#if AC3ENC_TYPE == AC3ENC_TYPE_AC3_FIXED
-static const AVOption ac3fixed_options[] = {
-#elif AC3ENC_TYPE == AC3ENC_TYPE_AC3
-static const AVOption ac3_options[] = {
-#else /* AC3ENC_TYPE_EAC3 */
-static const AVOption eac3_options[] = {
-#endif
+static const AVOption AC3ENC_OPT_TBL_NAME[] = {
 /* Metadata Options */
 {"per_frame_metadata", "Allow Changing Metadata Per-Frame", 
OFFSET(allow_per_frame_metadata), AV_OPT_TYPE_INT, {.dbl = 0 }, 0, 1, 
AC3ENC_PARAM},
 #if AC3ENC_TYPE != AC3ENC_TYPE_EAC3
diff --git a/libavcodec/eac3enc.c b/libavcodec/eac3enc.c
index 409d581..47f0f10 100644
--- a/libavcodec/eac3enc.c
+++ b/libavcodec/eac3enc.c
@@ -31,6 +31,7 @@
 
 
 #define AC3ENC_TYPE AC3ENC_TYPE_EAC3
+#define AC3ENC_OPT_TBL_NAME eac3_options
 #include "ac3enc_opts_template.c"
 static const AVClass eac3enc_class = { "E-AC-3 Encoder", av_default_item_name,
                                        eac3_options, LIBAVUTIL_VERSION_INT };
-- 
1.7.9.5

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to