[Asterisk-cvs] asterisk rtp.c,1.125,1.126
kpfleming at lists.digium.com
kpfleming at lists.digium.com
Sat May 14 19:35:42 CDT 2005
Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv32303
Modified Files:
rtp.c
Log Message:
properly strip incoming padded RTP frames (bug #4264)
Index: rtp.c
===================================================================
RCS file: /usr/cvsroot/asterisk/rtp.c,v
retrieving revision 1.125
retrieving revision 1.126
diff -u -d -r1.125 -r1.126
--- rtp.c 4 May 2005 04:43:30 -0000 1.125
+++ rtp.c 14 May 2005 23:41:12 -0000 1.126
@@ -429,6 +429,7 @@
int version;
int payloadtype;
int hdrlen = 12;
+ int padding;
int mark;
int ext;
int x;
@@ -482,10 +483,17 @@
return &null_frame;
payloadtype = (seqno & 0x7f0000) >> 16;
+ padding = seqno & (1 << 29);
mark = seqno & (1 << 23);
ext = seqno & (1 << 28);
seqno &= 0xffff;
timestamp = ntohl(rtpheader[1]);
+
+ if (padding) {
+ /* Remove padding bytes */
+ res -= rtp->rawdata[AST_FRIENDLY_OFFSET + res - 1];
+ }
+
if (ext) {
/* RTP Extension present */
hdrlen += 4;
More information about the svn-commits
mailing list