summaryrefslogtreecommitdiff
path: root/modules/opus
diff options
context:
space:
mode:
authorAlfred E. Heggestad <alfred.heggestad@gmail.com>2017-10-08 19:19:04 +0200
committerAlfred E. Heggestad <alfred.heggestad@gmail.com>2017-10-08 19:19:04 +0200
commita2b4118bae0ebcf9b8243f25bfb20746529aea17 (patch)
tree6fd9b9509dab4e76591bf9094664d43508cb716a /modules/opus
parent60096f19f3335ab4c9a2e4a9d73c78a1de482010 (diff)
opus: fix encoder bitrate, ref #305
Diffstat (limited to 'modules/opus')
-rw-r--r--modules/opus/opus.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/opus/opus.c b/modules/opus/opus.c
index 78ed3bf..881596e 100644
--- a/modules/opus/opus.c
+++ b/modules/opus/opus.c
@@ -63,13 +63,12 @@ static struct aucodec opus = {
.srate = 48000,
.crate = 48000,
.ch = 2,
- .fmtp = NULL,
+ .fmtp = fmtp,
.encupdh = opus_encode_update,
.ench = opus_encode_frm,
.decupdh = opus_decode_update,
.dech = opus_decode_frm,
.plch = opus_decode_pkloss,
- .fmtp_ench = opus_fmtp_enc,
};
@@ -134,6 +133,11 @@ static int module_init(void)
(void)conf_get_bool(conf, "opus_mirror", &opus_mirror);
+ if (opus_mirror) {
+ opus.fmtp = NULL;
+ opus.fmtp_ench = opus_fmtp_enc;
+ }
+
debug("opus: fmtp=\"%s\"\n", fmtp);
aucodec_register(baresip_aucodecl(), &opus);