FS-9612 #resolve [RTCP-MUX wrongly enabled in cases where answer contains rtcp but offer didn't / remote addr not obtained in UDPTL mode] %backport=1.6
This commit is contained in:
parent
2a3b8a230c
commit
9a990add75
|
@ -4105,7 +4105,7 @@ SWITCH_DECLARE(uint8_t) switch_core_media_negotiate_sdp(switch_core_session_t *s
|
|||
int codec_ms = 0;
|
||||
uint32_t remote_codec_rate = 0, fmtp_remote_codec_rate = 0;
|
||||
const char *tmp;
|
||||
int m_idx = 0, skip_rtcp = 0, skip_video_rtcp = 0;
|
||||
int m_idx = 0, skip_rtcp = 0, skip_video_rtcp = 0, got_rtcp_mux = 0, got_video_rtcp_mux = 0;
|
||||
int nm_idx = 0;
|
||||
int vmatch_pt = 0;
|
||||
int rtcp_auto_audio = 0, rtcp_auto_video = 0;
|
||||
|
@ -4609,12 +4609,20 @@ SWITCH_DECLARE(uint8_t) switch_core_media_negotiate_sdp(switch_core_session_t *s
|
|||
}
|
||||
|
||||
skip_rtcp = 0;
|
||||
got_rtcp_mux = 0;
|
||||
for (attr = m->m_attributes; attr; attr = attr->a_next) {
|
||||
if (!strcasecmp(attr->a_name, "rtcp-mux") || !strcasecmp(attr->a_name, "ice-ufrag")) {
|
||||
if (!strcasecmp(attr->a_name, "rtcp-mux")) {
|
||||
got_rtcp_mux = 1;
|
||||
skip_rtcp = 1;
|
||||
} else if (!strcasecmp(attr->a_name, "ice-ufrag")) {
|
||||
skip_rtcp = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (!got_rtcp_mux) {
|
||||
a_engine->rtcp_mux = -1;
|
||||
}
|
||||
|
||||
for (attr = m->m_attributes; attr; attr = attr->a_next) {
|
||||
if (!strcasecmp(attr->a_name, "rtcp") && attr->a_value && !skip_rtcp) {
|
||||
a_engine->remote_rtcp_port = (switch_port_t)atoi(attr->a_value);
|
||||
|
@ -5264,12 +5272,20 @@ SWITCH_DECLARE(uint8_t) switch_core_media_negotiate_sdp(switch_core_session_t *s
|
|||
}
|
||||
|
||||
skip_video_rtcp = 0;
|
||||
got_video_rtcp_mux = 0;
|
||||
for (attr = m->m_attributes; attr; attr = attr->a_next) {
|
||||
if (!strcasecmp(attr->a_name, "rtcp-mux") || !strcasecmp(attr->a_name, "ice-ufrag")) {
|
||||
if (!strcasecmp(attr->a_name, "rtcp-mux")) {
|
||||
got_video_rtcp_mux = 1;
|
||||
skip_video_rtcp = 1;
|
||||
} else if (!strcasecmp(attr->a_name, "ice-ufrag")) {
|
||||
skip_video_rtcp = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (!got_video_rtcp_mux) {
|
||||
v_engine->rtcp_mux = -1;
|
||||
}
|
||||
|
||||
for (attr = m->m_attributes; attr; attr = attr->a_next) {
|
||||
if (!strcasecmp(attr->a_name, "framerate") && attr->a_value) {
|
||||
//framerate = atoi(attr->a_value);
|
||||
|
|
|
@ -5315,9 +5315,12 @@ static switch_status_t read_rtp_packet(switch_rtp_t *rtp_session, switch_size_t
|
|||
}
|
||||
}
|
||||
|
||||
if (rtp_session->has_rtp) {
|
||||
if (rtp_session->has_rtp || rtp_session->flags[SWITCH_RTP_FLAG_UDPTL]) {
|
||||
rtp_session->missed_count = 0;
|
||||
switch_cp_addr(rtp_session->rtp_from_addr, rtp_session->from_addr);
|
||||
}
|
||||
|
||||
if (rtp_session->has_rtp) {
|
||||
rtp_session->last_rtp_hdr = rtp_session->recv_msg.header;
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue