git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4476 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2007-03-08 00:27:22 +00:00
parent 9a56887476
commit b67b980a35
1 changed files with 8 additions and 0 deletions

View File

@ -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;