Module: sems
Branch: 1.4
Commit: c70dd31d9a4e0c78c764dab0c061856d7187326f
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=c70dd31d9a4e0c78c764dab0c061856d7187326f

Author: Raphael Coeffic <[email protected]>
Committer: Raphael Coeffic <[email protected]>
Date:   Sun Mar 20 01:42:11 2011 +0100

b/f: sequence number & SSRC while relaying RTP.

---

 core/AmRtpStream.cpp |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/core/AmRtpStream.cpp b/core/AmRtpStream.cpp
index 2e9b4af..651d19f 100644
--- a/core/AmRtpStream.cpp
+++ b/core/AmRtpStream.cpp
@@ -724,12 +724,15 @@ int AmRtpStream::nextPacket(AmRtpPacket*& p)
   return 1;
 }
 
+#include "rtp/rtp.h"
+
 void AmRtpStream::relay(AmRtpPacket* p) {
   if (!l_port) // not yet initialized
     return;
 
-  p->sequence = sequence++;
-  p->ssrc = l_ssrc;
+  rtp_hdr_t* hdr = (rtp_hdr_t*)p->getBuffer();
+  hdr->seq = htons(sequence++);
+  hdr->ssrc = htonl(l_ssrc);
   p->setAddr(&r_saddr);
 
   if(p->send(l_sd) < 0){

_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to