[asterisk-commits] file: branch 1.2 r69992 - /branches/1.2/rtp.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Jun 19 12:00:58 CDT 2007
Author: file
Date: Tue Jun 19 12:00:58 2007
New Revision: 69992
URL: http://svn.digium.com/view/asterisk?view=rev&rev=69992
Log:
Handle the CC field in the RTP header. (issue #9384 reported by DoodleHu)
Modified:
branches/1.2/rtp.c
Modified: branches/1.2/rtp.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/rtp.c?view=diff&rev=69992&r1=69991&r2=69992
==============================================================================
--- branches/1.2/rtp.c (original)
+++ branches/1.2/rtp.c Tue Jun 19 12:00:58 2007
@@ -437,6 +437,7 @@
int padding;
int mark;
int ext;
+ int cc;
int x;
char iabuf[INET_ADDRSTRLEN];
unsigned int ssrc;
@@ -497,6 +498,7 @@
padding = seqno & (1 << 29);
mark = seqno & (1 << 23);
ext = seqno & (1 << 28);
+ cc = (seqno & 0xF000000) >> 24;
seqno &= 0xffff;
timestamp = ntohl(rtpheader[1]);
ssrc = ntohl(rtpheader[2]);
@@ -514,10 +516,15 @@
res -= rtp->rawdata[AST_FRIENDLY_OFFSET + res - 1];
}
+ if (cc) {
+ /* CSRC fields present */
+ hdrlen += cc*4;
+ }
+
if (ext) {
/* RTP Extension present */
+ hdrlen += (ntohl(rtpheader[hdrlen/4]) & 0xffff) << 2;
hdrlen += 4;
- hdrlen += (ntohl(rtpheader[3]) & 0xffff) << 2;
}
if (res < hdrlen) {
More information about the asterisk-commits
mailing list