From 7bc999309cd2b9be2420f30dde9ef20b8c92ed96 Mon Sep 17 00:00:00 2001 From: Dragos Oancea Date: Thu, 15 Jun 2023 16:29:43 +0300 Subject: [PATCH] [mod_opus] fix remote codec rate to match. --- src/mod/codecs/mod_opus/mod_opus.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mod/codecs/mod_opus/mod_opus.c b/src/mod/codecs/mod_opus/mod_opus.c index ce364cc3ef..4a47b45df4 100644 --- a/src/mod/codecs/mod_opus/mod_opus.c +++ b/src/mod/codecs/mod_opus/mod_opus.c @@ -314,6 +314,10 @@ static switch_status_t switch_opus_fmtp_parse(const char *fmtp, switch_codec_fmt if (!switch_opus_acceptable_rate(codec_settings->sprop_maxcapturerate)) { codec_settings->sprop_maxcapturerate = 0; /* value not supported */ } + + if (codec_settings->sprop_maxcapturerate) { + codec_fmtp->actual_samples_per_second = codec_settings->sprop_maxcapturerate; + } } } }