Commit c857c51b authored by aymeric's avatar aymeric

Use same remote address as the SSRC we are listening to.

git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@192 3f6dc0c8-ddfe-455d-9043-3cd528dc4637
parent b1bc8339
......@@ -137,6 +137,16 @@ void rtp_session_rtp_parse(RtpSession *session, mblk_t *mp, uint32_t local_str_t
session->inc_ssrc_candidate=rtp->ssrc;
}
if (session->inc_same_ssrc_count>SSRC_CHANGED_THRESHOLD){
/* store the sender rtp address to do symmetric RTP */
if (!session->use_connect){
if (session->rtp.socket>0 && session->symmetric_rtp){
/* store the sender rtp address to do symmetric RTP */
memcpy(&session->rtp.rem_addr,addr,addrlen);
session->rtp.rem_addrlen=addrlen;
}
}
session->rcv.ssrc=rtp->ssrc;
rtp_signal_table_emit(&session->on_ssrc_changed);
}else{
......@@ -157,6 +167,14 @@ void rtp_session_rtp_parse(RtpSession *session, mblk_t *mp, uint32_t local_str_t
}else{
session->ssrc_set=TRUE;
session->rcv.ssrc=rtp->ssrc;
if (!session->use_connect){
if (session->rtp.socket>0 && session->symmetric_rtp){
/* store the sender rtp address to do symmetric RTP */
memcpy(&session->rtp.rem_addr,addr,addrlen);
session->rtp.rem_addrlen=addrlen;
}
}
}
/* update some statistics */
......
......@@ -901,10 +901,10 @@ rtp_session_rtp_recv (RtpSession * session, uint32_t user_ts)
&addrlen);
if (error > 0){
if (session->symmetric_rtp && !sock_connected){
/* store the sender rtp address to do symmetric RTP */
memcpy(&session->rtp.rem_addr,&remaddr,addrlen);
session->rtp.rem_addrlen=addrlen;
if (session->use_connect){
/* store the sender rtp address to do symmetric RTP */
memcpy(&session->rtp.rem_addr,&remaddr,addrlen);
session->rtp.rem_addrlen=addrlen;
if (try_connect(sockfd,(struct sockaddr*)&remaddr,addrlen))
session->flags|=RTP_SOCKET_CONNECTED;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment