From a2b4118bae0ebcf9b8243f25bfb20746529aea17 Mon Sep 17 00:00:00 2001 From: "Alfred E. Heggestad" Date: Sun, 8 Oct 2017 19:19:04 +0200 Subject: opus: fix encoder bitrate, ref #305 --- modules/opus/opus.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'modules/opus') 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); -- cgit v1.2.3