summaryrefslogtreecommitdiff
path: root/modules/opus
diff options
context:
space:
mode:
Diffstat (limited to 'modules/opus')
-rw-r--r--modules/opus/opus.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/modules/opus/opus.c b/modules/opus/opus.c
index 881596e..d1802a8 100644
--- a/modules/opus/opus.c
+++ b/modules/opus/opus.c
@@ -36,7 +36,7 @@
static bool opus_mirror;
-static char fmtp[256] = "stereo=1;sprop-stereo=1";
+static char fmtp[256] = "";
static char fmtp_mirror[256];
@@ -88,9 +88,19 @@ static int module_init(void)
struct conf *conf = conf_cur();
uint32_t value;
char *p = fmtp + str_len(fmtp);
- bool b;
+ bool b, stereo = true;
int n = 0;
+ conf_get_bool(conf, "opus_stereo", &stereo);
+
+ /* always set stereo parameter first */
+ n = re_snprintf(p, sizeof(fmtp) - str_len(p),
+ "stereo=%d;sprop-stereo=%d", stereo, stereo);
+ if (n <= 0)
+ return ENOMEM;
+
+ p += n;
+
if (0 == conf_get_u32(conf, "opus_bitrate", &value)) {
n = re_snprintf(p, sizeof(fmtp) - str_len(p),