From 2cb7ca2bbc41c8fb3b3552bdff78db63fcde3ec9 Mon Sep 17 00:00:00 2001 From: shaunjstokes Date: Mon, 14 Oct 2024 13:18:57 +0200 Subject: [PATCH] Update switch_core_media.c - Patch for #2226 Patch for #2226 --- src/switch_core_media.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/switch_core_media.c b/src/switch_core_media.c index de5d0eff74..8b533fa50e 100644 --- a/src/switch_core_media.c +++ b/src/switch_core_media.c @@ -5517,6 +5517,10 @@ SWITCH_DECLARE(uint8_t) switch_core_media_negotiate_sdp(switch_core_session_t *s uint32_t bit_rate = imp->bits_per_second; uint32_t codec_rate = imp->samples_per_second; + if (!strcasecmp(map->rm_encoding, "opus")) { + codec_rate = imp->actual_samples_per_second; + } + if (imp->codec_type != SWITCH_CODEC_TYPE_AUDIO) { continue; }