On Sat, Feb 21, 2009 at 1:35 AM, Paulo Vicentini
<[email protected]> wrote:
> it seems that MprDecode::handleReset() is not beeing called after a SSRC
> change is detected...and i think it should

Yes, it should. Please try attached patch. You should call
MprRtpDispatcher::MpRtpStream::setSSRC() on the stream
change. Let me know whether it helps.


-- 
Regards,
Alexander Chemeris.

SIPez LLC.
SIP VoIP, IM and Presence Consulting
http://www.SIPez.com
tel: +1 (617) 273-4000
Index: sipXmediaLib/include/mp/MprRtpDispatcher.h
===================================================================
--- sipXmediaLib/include/mp/MprRtpDispatcher.h	(revision 11280)
+++ sipXmediaLib/include/mp/MprRtpDispatcher.h	(working copy)
@@ -188,6 +188,13 @@
 
         /// Set stream SSRC.
       inline void setSSRC(RtpSRC ssrc);
+        /**<
+        *  setSSRC() not only sets SSRC of the stream, but also resets decoder
+        *  to prepare it for a new stream.
+        *
+        *  Note: activate() should always be called after setSSRC() to eliminate
+        *        excessive decoder reset on startup.
+        */
 
         /// Send notification on stream activation/deactivation.
       OsStatus postStreamNotif(OsMsgDispatcher *pMsgQ,
@@ -298,6 +305,15 @@
 
 void MprRtpDispatcher::MpRtpStream::setSSRC(RtpSRC ssrc)
 {
+   // Reset decoder if this is not the first time setSSRC() is called.
+   // Note, that we deliberately does not check whether SSRC really changed.
+   // We trust caller to perform this check. Furthermore some broken
+   // implementations does not change SSRC on a new stream start.
+   if (mAddress == 0 && mpDecode != NULL)
+   {
+      mpDecode->reset();
+   }
+
    setValue(ssrc);
 }
 
_______________________________________________
sipxtapi-dev mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/

Reply via email to