fix MODAPP-3

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6037 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2007-10-23 21:32:17 +00:00
parent 2414ad8c69
commit 673b1cff3b
2 changed files with 13 additions and 1 deletions

View File

@@ -1219,6 +1219,9 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_zerocopy_read_frame(switch_rtp_t *rtp
frame->packetlen = bytes;
frame->source = __FILE__;
frame->flags |= SFF_RAW_RTP;
if (frame->payload == rtp_session->te) {
frame->flags |= SFF_RFC2833;
}
frame->timestamp = ntohl(rtp_session->recv_msg.header.ts);
frame->seq = (uint16_t)ntohs((u_short)rtp_session->recv_msg.header.seq);
frame->ssrc = ntohl(rtp_session->recv_msg.header.ssrc);
@@ -1282,8 +1285,15 @@ static int rtp_common_write(switch_rtp_t *rtp_session, void *data, uint32_t data
if (fwd) {
bytes = datalen;
send_msg = (rtp_msg_t *) data;
if (*flags & SFF_RFC2833) {
send_msg->header.pt = rtp_session->te;
}
} else {
uint8_t m = 0;
if (*flags & SFF_RFC2833) {
payload = rtp_session->te;
}
if ((rtp_session->ts > (rtp_session->last_write_ts + (rtp_session->samples_per_interval * 10)))
|| rtp_session->ts == rtp_session->samples_per_interval) {