From: Anthony Minessale Date: Mon, 21 Mar 2011 20:03:44 +0000 (-0500) Subject: FS-3172 not so fast also need to do it after the secure decoders for srtp/zrtp X-Git-Tag: v1.2-rc1~171^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=37a48583b236f6c8e80217357f7ab798f4a7ab66;p=thirdparty%2Ffreeswitch.git FS-3172 not so fast also need to do it after the secure decoders for srtp/zrtp --- diff --git a/src/switch_rtp.c b/src/switch_rtp.c index e33fc95eb1..22d0cfdfce 100644 --- a/src/switch_rtp.c +++ b/src/switch_rtp.c @@ -2430,11 +2430,6 @@ static switch_status_t read_rtp_packet(switch_rtp_t *rtp_session, switch_size_t if (*bytes) { uint16_t seq = ntohs((uint16_t) rtp_session->recv_msg.header.seq); - if (switch_test_flag(rtp_session, SWITCH_RTP_FLAG_BYTESWAP) && rtp_session->recv_msg.header.pt == rtp_session->rpayload) { - switch_swap_linear((int16_t *)rtp_session->recv_msg.body, (int) *bytes - rtp_header_len); - } - - if (rtp_session->last_seq && rtp_session->last_seq+1 != seq) { #ifdef DEBUG_MISSED_SEQ switch_size_t flushed_packets_diff = rtp_session->stats.inbound.flush_packet_count - rtp_session->last_flush_packet_count; @@ -2575,6 +2570,10 @@ static switch_status_t read_rtp_packet(switch_rtp_t *rtp_session, switch_size_t } } + + if (switch_test_flag(rtp_session, SWITCH_RTP_FLAG_BYTESWAP) && rtp_session->recv_msg.header.pt == rtp_session->rpayload) { + switch_swap_linear((int16_t *)rtp_session->recv_msg.body, (int) *bytes - rtp_header_len); + } if (rtp_session->jb && !rtp_session->pause_jb && rtp_session->recv_msg.header.version == 2 && *bytes) { if (rtp_session->recv_msg.header.m && rtp_session->recv_msg.header.pt != rtp_session->recv_te &&