[asterisk-bugs] [JIRA] (ASTERISK-22601) [patch]MutlicastRTP does not set SSRC. SSRC is always set to 0
Rusty Newton (JIRA)
noreply at issues.asterisk.org
Thu Sep 26 17:11:04 CDT 2013
Rusty Newton created ASTERISK-22601:
---------------------------------------
Summary: [patch]MutlicastRTP does not set SSRC. SSRC is always set to 0
Key: ASTERISK-22601
URL: https://issues.asterisk.org/jira/browse/ASTERISK-22601
Project: Asterisk
Issue Type: Bug
Security Level: None
Components: Resources/res_rtp_multicast
Affects Versions: SVN, 11.5.1
Environment: ALL
Reporter: Simone Camporeale
Severity: Minor
I found a bug in res/res_rtp_multicast.c
RTP packets have always SSRC set to 0
I discovered this bug testing MulticastRTP app.
In order to reproduce this BUG activate a MulticastRTP session and sniff packets with WireShark.
In WireShark set protocol to RTP and filter by selected Multicast address.
This bug originates conflicts in mutlicast streams.
I noticed this bug using gstreamer. Gstreamer decodes first MulticastRTP session correctly but it is not able to decode second MulticastRTP session.
After some minutes first rtp session expires and gstreamers is able to decode rtp packet.
To fix this issue i edited this file:
{code:title=res/res_rtp_multicast.c|borderStyle=solid}
Index: res/res_rtp_multicast.c
===================================================================
--- res/res_rtp_multicast.c (revision 399617)
+++ res/res_rtp_multicast.c (working copy)
@@ -260,14 +260,15 @@
/* 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));
+ 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);
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.asterisk.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the asterisk-bugs
mailing list