提交 e94ddad1 authored 作者: Anthony Minessale's avatar Anthony Minessale

small refactor

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15305 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 de496b4b
...@@ -1936,12 +1936,18 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_ ...@@ -1936,12 +1936,18 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_
} }
/* ignore packets not meant for us unless the auto-adjust window is open */ /* ignore packets not meant for us unless the auto-adjust window is open */
if (bytes && !switch_test_flag(rtp_session, SWITCH_RTP_FLAG_AUTOADJ) && if (bytes) {
(!switch_cmp_addr(rtp_session->from_addr, rtp_session->remote_addr) || if (switch_test_flag(rtp_session, SWITCH_RTP_FLAG_AUTOADJ)) {
((rtp_session->cng_pt && rtp_session->recv_msg.header.pt == rtp_session->cng_pt) || rtp_session->recv_msg.header.pt == 13))) { if (((rtp_session->cng_pt && rtp_session->recv_msg.header.pt == rtp_session->cng_pt) || rtp_session->recv_msg.header.pt == 13)) {
bytes = 0; bytes = 0;
goto recvfrom; goto recvfrom;
}
} else if (!switch_cmp_addr(rtp_session->from_addr, rtp_session->remote_addr)) {
bytes = 0;
goto recvfrom;
}
} }
if (bytes && switch_test_flag(rtp_session, SWITCH_RTP_FLAG_AUTOADJ) && switch_sockaddr_get_port(rtp_session->from_addr)) { if (bytes && switch_test_flag(rtp_session, SWITCH_RTP_FLAG_AUTOADJ) && switch_sockaddr_get_port(rtp_session->from_addr)) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论