From 5065c0b11869007809f4983432f93e068d43ac0e Mon Sep 17 00:00:00 2001 From: Dragos Oancea Date: Wed, 24 Aug 2022 13:02:35 +0300 Subject: [PATCH] [mod_opus] fix samples_per_packet for 8khz, 16khz, 24khz. --- src/mod/codecs/mod_opus/mod_opus.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mod/codecs/mod_opus/mod_opus.c b/src/mod/codecs/mod_opus/mod_opus.c index 9f34c193db..1ab7d9fba1 100644 --- a/src/mod/codecs/mod_opus/mod_opus.c +++ b/src/mod/codecs/mod_opus/mod_opus.c @@ -1342,7 +1342,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_opus_load) { switch_codec_interface_t *codec_interface; switch_api_interface_t *commands_api_interface; - int samples = 480; + int samples = 480; /* start with 10 ms ptime */ int bytes = 960; int mss = 10000; int x = 0; @@ -1443,7 +1443,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_opus_load) } /* 16 khz */ - samples = 480; + samples = 160; bytes = 320; mss = 10000; rate = 16000; @@ -1540,7 +1540,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_opus_load) } /* 8 khz */ - samples = 480; + samples = 80; bytes = 160; mss = 10000; rate = 8000;