From: Anthony Minessale Date: Fri, 12 Aug 2016 19:28:45 +0000 (-0500) Subject: FS-9410 #resolve [PLI Missing Media Source SSRC] X-Git-Tag: v1.6.10~1^2~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eeba18394d5b29dd5a16cd73e60491c1ab44788c;p=thirdparty%2Ffreeswitch.git FS-9410 #resolve [PLI Missing Media Source SSRC] --- diff --git a/src/switch_rtp.c b/src/switch_rtp.c index 284ac2819e..8dbbeac4a0 100644 --- a/src/switch_rtp.c +++ b/src/switch_rtp.c @@ -2072,13 +2072,13 @@ static int check_rtcp_and_ice(switch_rtp_t *rtp_session) rtp_session->rtcp_send_msg.header.length = htons((uint16_t)(rtcp_bytes / 4) - 1); if (rtp_session->flags[SWITCH_RTP_FLAG_VIDEO]) { - //if (rtp_session->remote_ssrc == 0) { - // rtp_session->remote_ssrc = rtp_session->stats.rtcp.peer_ssrc; - //} + if (rtp_session->remote_ssrc == 0 && rtp_session->stats.rtcp.peer_ssrc) { + rtp_session->remote_ssrc = rtp_session->stats.rtcp.peer_ssrc; + } - //if (rtp_session->remote_ssrc == 0) { - // rtp_session->remote_ssrc = ntohl(rtp_session->last_rtp_hdr.ssrc); - //} + if (rtp_session->remote_ssrc == 0 && rtp_session->last_rtp_hdr.ssrc) { + rtp_session->remote_ssrc = ntohl(rtp_session->last_rtp_hdr.ssrc); + } if (rtp_session->pli_count) { @@ -2095,7 +2095,8 @@ static int check_rtcp_and_ice(switch_rtp_t *rtp_session) ext_hdr->send_ssrc = htonl(rtp_session->ssrc); ext_hdr->recv_ssrc = htonl(rtp_session->remote_ssrc); - switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_DEBUG1, "Sending RTCP PLI\n"); + switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_DEBUG1, "Sending RTCP PLI %u %u\n", + rtp_session->ssrc, rtp_session->remote_ssrc); ext_hdr->length = htons((uint8_t)(sizeof(switch_rtcp_ext_hdr_t) / 4) - 1); rtcp_bytes += sizeof(switch_rtcp_ext_hdr_t);