summaryrefslogtreecommitdiff
path: root/libavcodec/eac3enc.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-12-03 05:32:18 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2021-02-07 10:30:14 +0100
commit134193a2ff1885880d1d597d8c1316d4b47e3af6 (patch)
tree9b6ffb67cdd1e2edfa0f07fca98ce43802309084 /libavcodec/eac3enc.c
parentbdd55e1dd835f71bb78244d6146ec45d6158b2ec (diff)
avcodec/ac3enc: Share options and defaults
Both AC-3 encoder share the same options, yet they are nevertheless duplicated in the binary; and the options applying to the EAC-3 encoder are a proper subset of the options for the AC-3 encoders, so that it can use the same options as the former by putting the options specific to AC-3 at the front. This commit implements this. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec/eac3enc.c')
-rw-r--r--libavcodec/eac3enc.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/libavcodec/eac3enc.c b/libavcodec/eac3enc.c
index 585588a480..356bb677c2 100644
--- a/libavcodec/eac3enc.c
+++ b/libavcodec/eac3enc.c
@@ -32,13 +32,10 @@
#include "eac3_data.h"
-#define AC3ENC_TYPE AC3ENC_TYPE_EAC3
-#include "ac3enc_opts_template.c"
-
static const AVClass eac3enc_class = {
.class_name = "E-AC-3 Encoder",
.item_name = av_default_item_name,
- .option = ac3_options,
+ .option = &ff_ac3_enc_options[2], /* First two options are AC-3 only. */
.version = LIBAVUTIL_VERSION_INT,
};
@@ -265,6 +262,6 @@ AVCodec ff_eac3_encoder = {
.priv_class = &eac3enc_class,
.supported_samplerates = ff_ac3_sample_rate_tab,
.channel_layouts = ff_ac3_channel_layouts,
- .defaults = ac3_defaults,
+ .defaults = ff_ac3_enc_defaults,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
};