Skip to content
Snippets Groups Projects
Commit 49f272ab authored by Tristan Matthews's avatar Tristan Matthews
Browse files

* #6595: fix initialization order for AudioRTP

This avoids out of order deallocation issues
parent 85848246
No related branches found
No related tags found
No related merge requests found
......@@ -43,12 +43,12 @@
namespace sfl
{
AudioRtpSession::AudioRtpSession (SIPCall * sipcall, RtpMethod type, ost::RTPDataQueue *queue, ost::Thread *thread) :
_ca (sipcall)
, AudioRtpRecordHandler (sipcall)
AudioRtpRecordHandler (sipcall)
, _ca (sipcall)
, _timestamp (0)
, _isStarted (false)
, _timestampIncrement (0)
, _timestampCount (0)
, _isStarted (false)
, _type(type)
, _queue(queue)
, _thread(thread)
......
......@@ -43,8 +43,8 @@ namespace sfl
{
AudioSymmetricRtpSession::AudioSymmetricRtpSession (SIPCall * sipcall) :
ost::SymmetricRTPSession (ost::InetHostAddress (sipcall->getLocalIp().c_str()), sipcall->getLocalAudioPort())
,AudioRtpSession(sipcall, Symmetric, static_cast<ost::RTPDataQueue *>(this), static_cast<ost::Thread *>(this))
AudioRtpSession(sipcall, Symmetric, static_cast<ost::RTPDataQueue *>(this), static_cast<ost::Thread *>(this))
,ost::SymmetricRTPSession (ost::InetHostAddress (sipcall->getLocalIp().c_str()), sipcall->getLocalAudioPort())
, _rtpThread (new AudioRtpThread (this))
{
_info ("AudioSymmetricRtpSession: Setting new RTP session with destination %s:%d", _ca->getLocalIp().c_str(), _ca->getLocalAudioPort());
......@@ -65,7 +65,7 @@ void AudioSymmetricRtpSession::final()
delete this;
}
AudioSymmetricRtpSession::AudioRtpThread::AudioRtpThread (AudioSymmetricRtpSession *session) : rtpSession (session), running (true)
AudioSymmetricRtpSession::AudioRtpThread::AudioRtpThread (AudioSymmetricRtpSession *session) : running (true), rtpSession (session)
{
_debug ("AudioSymmetricRtpSession: Create new rtp thread");
}
......
......@@ -50,12 +50,12 @@ namespace sfl
AudioZrtpSession::AudioZrtpSession (SIPCall * sipcall, const std::string& zidFilename) :
// ost::SymmetricZRTPSession (ost::InetHostAddress (sipcall->getLocalIp().c_str()), sipcall->getLocalAudioPort()),
ost::TRTPSessionBase<ost::SymmetricRTPChannel, ost::SymmetricRTPChannel, ost::ZrtpQueue> (ost::InetHostAddress (sipcall->getLocalIp().c_str()),
AudioRtpSession(sipcall, Zrtp, static_cast<ost::RTPDataQueue *>(this), static_cast<ost::Thread *>(this))
,ost::TRTPSessionBase<ost::SymmetricRTPChannel, ost::SymmetricRTPChannel, ost::ZrtpQueue> (ost::InetHostAddress (sipcall->getLocalIp().c_str()),
sipcall->getLocalAudioPort(),
0,
ost::MembershipBookkeeping::defaultMembersHashSize,
ost::defaultApplication())
,AudioRtpSession(sipcall, Zrtp, static_cast<ost::RTPDataQueue *>(this), static_cast<ost::Thread *>(this))
, _zidFilename (zidFilename)
{
_debug ("AudioZrtpSession initialized");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment