From b67b980a35f92b33311f1d30a4a9aceba4cf674d Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Thu, 8 Mar 2007 00:27:22 +0000 Subject: [PATCH] update git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4476 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/switch_rtp.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/switch_rtp.c b/src/switch_rtp.c index 03b3424280..00c47d2966 100644 --- a/src/switch_rtp.c +++ b/src/switch_rtp.c @@ -1389,6 +1389,10 @@ SWITCH_DECLARE(int) switch_rtp_write(switch_rtp_t *rtp_session, void *data, uint rtp_session->ts = ts; } + if (rtp_session->ts <= rtp_session->last_write_ts) { + rtp_session->ts += rtp_session->packet_size; + } + if (rtp_session->ts > rtp_session->last_write_ts + rtp_session->packet_size || rtp_session->ts == rtp_session->packet_size) { mark++; } @@ -1454,6 +1458,10 @@ SWITCH_DECLARE(int) switch_rtp_write_frame(switch_rtp_t *rtp_session, switch_fra mark++; } + if (rtp_session->ts <= rtp_session->last_write_ts) { + rtp_session->ts += rtp_session->packet_size; + } + rtp_session->seq = ntohs(rtp_session->seq) + 1; rtp_session->seq = htons(rtp_session->seq); rtp_session->send_msg.header.seq = rtp_session->seq;