From: Anthony Minessale Date: Tue, 16 Apr 2013 14:25:02 +0000 (-0500) Subject: try to be back compat with the more logical yet incorrect sdp format for opus X-Git-Tag: v1.5.1~231 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fda6e896e2eeacfcfd3f92fd75c421b8e8675f5c;p=thirdparty%2Ffreeswitch.git try to be back compat with the more logical yet incorrect sdp format for opus --- diff --git a/src/switch_core_media.c b/src/switch_core_media.c index 6287a694de..ffb542d88c 100644 --- a/src/switch_core_media.c +++ b/src/switch_core_media.c @@ -2692,7 +2692,12 @@ SWITCH_DECLARE(uint8_t) switch_core_media_negotiate_sdp(switch_core_session_t *s a_engine->codec_params.channels = mmap->rm_params ? atoi(mmap->rm_params) : 1; if (!strcasecmp((char *) mmap->rm_encoding, "opus")) { - a_engine->codec_params.adv_channels = 2; /* IKR ???*/ + if (a_engine->codec_params.channels == 1) { + switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Invald SDP for opus. Don't ask.. but it needs a /2\n"); + a_engine->codec_params.adv_channels = 1; + } else { + a_engine->codec_params.adv_channels = 2; /* IKR ???*/ + } if (!zstr((char *) mmap->rm_fmtp) && switch_stristr("stereo=1", (char *) mmap->rm_fmtp)) { a_engine->codec_params.channels = 2; } else {