tweak rtp

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6151 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2007-11-02 21:34:11 +00:00
parent 353b754d82
commit 69899e821d
1 changed files with 3 additions and 4 deletions

View File

@ -1611,11 +1611,10 @@ SWITCH_DECLARE(int) switch_rtp_write_frame(switch_rtp_t *rtp_session, switch_fra
rtp_session->ts = (uint32_t) frame->timestamp;
} else if (rtp_session->timer.timer_interface) {
uint32_t sc = rtp_session->timer.samplecount;
if (rtp_session->last_write_ts == sc) {
rtp_session->ts = sc + rtp_session->samples_per_interval;
} else {
rtp_session->ts = sc;
if (sc <= rtp_session->last_write_ts) {
sc = rtp_session->last_write_ts + rtp_session->samples_per_interval;
}
rtp_session->ts = sc;
} else {
rtp_session->ts += rtp_session->samples_per_interval;
}