[asterisk-commits] branch 1.2 r26773 - /branches/1.2/rtp.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu May 11 02:05:23 MST 2006


Author: kpfleming
Date: Thu May 11 04:05:22 2006
New Revision: 26773

URL: http://svn.digium.com/view/asterisk?rev=26773&view=rev
Log:
backport fix from trunk for bug #6934, ensuring that RTP mark bit is changed when SSRC changes

Modified:
    branches/1.2/rtp.c

Modified: branches/1.2/rtp.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/rtp.c?rev=26773&r1=26772&r2=26773&view=diff
==============================================================================
--- branches/1.2/rtp.c (original)
+++ branches/1.2/rtp.c Thu May 11 04:05:22 2006
@@ -90,6 +90,7 @@
 	unsigned char rawdata[8192 + AST_FRIENDLY_OFFSET];
 	/*! Synchronization source, RFC 3550, page 10. */
 	unsigned int ssrc;
+	unsigned int rxssrc;
 	unsigned int lastts;
 	unsigned int lastdigitts;
 	unsigned int lastrxts;
@@ -436,6 +437,7 @@
 	int ext;
 	int x;
 	char iabuf[INET_ADDRSTRLEN];
+	unsigned int ssrc;
 	unsigned int timestamp;
 	unsigned int *rtpheader;
 	static struct ast_frame *f, null_frame = { AST_FRAME_NULL, };
@@ -492,6 +494,14 @@
 	ext = seqno & (1 << 28);
 	seqno &= 0xffff;
 	timestamp = ntohl(rtpheader[1]);
+	ssrc = ntohl(rtpheader[2]);
+	
+	if (!mark && rtp->rxssrc && rtp->rxssrc != ssrc) {
+		ast_log(LOG_WARNING, "Forcing Marker bit, because SSRC has changed\n");
+		mark = 1;
+	}
+
+	rtp->rxssrc = ssrc;
 	
 	if (padding) {
 		/* Remove padding bytes */



More information about the asterisk-commits mailing list