[asterisk-commits] kmoore: branch 1.8 r400393 - /branches/1.8/res/res_rtp_multicast.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Oct 3 13:25:23 CDT 2013


Author: kmoore
Date: Thu Oct  3 13:25:21 2013
New Revision: 400393

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=400393
Log:
Ensure res_rtp_mutlicast sets SSRC properly

This fixes a bug where the SSRC field on multicast RTP can be stuck at
0 which can cause problems for endpoints trying to make sense of
incoming streams.

(closes issue ASTERISK-22567)
Reported by: Simone Camporeale
Patches:
    22567_res_mulitcast_ssrc.patch uploaded by Simone Camporeale (License 6536)

Modified:
    branches/1.8/res/res_rtp_multicast.c

Modified: branches/1.8/res/res_rtp_multicast.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/res/res_rtp_multicast.c?view=diff&rev=400393&r1=400392&r2=400393
==============================================================================
--- branches/1.8/res/res_rtp_multicast.c (original)
+++ branches/1.8/res/res_rtp_multicast.c Thu Oct  3 13:25:21 2013
@@ -261,14 +261,14 @@
 	/* Construct an RTP header for our packet */
 	rtpheader = (unsigned char *)(f->data.ptr - hdrlen);
 	put_unaligned_uint32(rtpheader, htonl((2 << 30) | (codec << 16) | (multicast->seqno)));
-	put_unaligned_uint32(rtpheader + 4, htonl(multicast->lastts));
 
 	if (ast_test_flag(f, AST_FRFLAG_HAS_TIMING_INFO)) {
 		put_unaligned_uint32(rtpheader + 4, htonl(f->ts * 8));
-	}
-	else {
-		put_unaligned_uint32(rtpheader + 8, htonl(multicast->ssrc));
-	}
+	} else {
+		put_unaligned_uint32(rtpheader + 4, htonl(multicast->lastts));
+	}
+
+	put_unaligned_uint32(rtpheader + 8, htonl(multicast->ssrc));
 
 	/* Increment sequence number and wrap to 0 if it overflows 16 bits. */
 	multicast->seqno = 0xFFFF & (multicast->seqno + 1);




More information about the asterisk-commits mailing list