mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-06-07 05:29:22 +00:00
Merge pull request #1659 in FS/freeswitch from ~LAZEDO/freeswitch:feature/FS-11313 to master
* commit 'f238e7b6126a916fb0f05105e4f16d52d6ee3df0': FS-11313 [core] set rtpc-mux if found in the sdp
This commit is contained in:
commit
fc7b0d2e6e
@ -13219,13 +13219,21 @@ static void switch_core_media_set_r_sdp_codec_string(switch_core_session_t *sess
|
|||||||
|
|
||||||
if ((m->m_type == sdp_media_audio || m->m_type == sdp_media_video) && m->m_port) {
|
if ((m->m_type == sdp_media_audio || m->m_type == sdp_media_video) && m->m_port) {
|
||||||
for (map = m->m_rtpmaps; map; map = map->rm_next) {
|
for (map = m->m_rtpmaps; map; map = map->rm_next) {
|
||||||
for (attr = m->m_attributes; attr; attr = attr->a_next) {
|
int found = 0;
|
||||||
|
for (attr = m->m_attributes; attr && found < 2; attr = attr->a_next) {
|
||||||
if (zstr(attr->a_name)) {
|
if (zstr(attr->a_name)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!strcasecmp(attr->a_name, "ptime") && attr->a_value) {
|
if (!strcasecmp(attr->a_name, "ptime") && attr->a_value) {
|
||||||
ptime = atoi(attr->a_value);
|
ptime = atoi(attr->a_value);
|
||||||
break;
|
found++;
|
||||||
|
}
|
||||||
|
if (!strcasecmp(attr->a_name, "rtcp-mux")) {
|
||||||
|
if (switch_channel_var_true(channel, "rtcp_mux_auto_detect")) {
|
||||||
|
switch_log_printf(SWITCH_CHANNEL_CHANNEL_LOG(channel), SWITCH_LOG_DEBUG, "setting rtcp-mux from sdp\n");
|
||||||
|
switch_channel_set_variable(channel, "rtcp_mux", "true");
|
||||||
|
}
|
||||||
|
found++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
switch_core_media_add_payload_map(session,
|
switch_core_media_add_payload_map(session,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user