[asterisk-commits] trunk r26759 - /trunk/rtp.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu May 11 01:47:38 MST 2006


Author: markster
Date: Thu May 11 03:47:37 2006
New Revision: 26759

URL: http://svn.digium.com/view/asterisk?rev=26759&view=rev
Log:
Set "MARK" whenever SSRC changes (bug #6934)

Modified:
    trunk/rtp.c

Modified: trunk/rtp.c
URL: http://svn.digium.com/view/asterisk/trunk/rtp.c?rev=26759&r1=26758&r2=26759&view=diff
==============================================================================
--- trunk/rtp.c (original)
+++ trunk/rtp.c Thu May 11 03:47:37 2006
@@ -93,6 +93,7 @@
 	struct ast_frame f;
 	unsigned char rawdata[8192 + AST_FRIENDLY_OFFSET];
 	unsigned int ssrc;		/*!< Synchronization source, RFC 3550, page 10. */
+	unsigned int rxssrc;
 	unsigned int lastts;
 	unsigned int lastdigitts;
 	unsigned int lastrxts;
@@ -430,6 +431,7 @@
 	int ext;
 	int x;
 	char iabuf[INET_ADDRSTRLEN];
+	unsigned int ssrc;
 	unsigned int timestamp;
 	unsigned int *rtpheader;
 	struct rtpPayloadType rtpPT;
@@ -485,6 +487,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