Skip to content
Snippets Groups Projects
Commit c996c569 authored by Alexandre Savard's avatar Alexandre Savard
Browse files

[#1450] Remove Semaphore object in AudioRtp thread deletion

AudioRtp deletion already protected by a mutex
parent 1b78fce3
Branches
No related tags found
No related merge requests found
...@@ -175,7 +175,7 @@ AudioRtpRTX::AudioRtpRTX (SIPCall *sipcall, bool sym) : time(new ost::Time()), _ ...@@ -175,7 +175,7 @@ AudioRtpRTX::AudioRtpRTX (SIPCall *sipcall, bool sym) : time(new ost::Time()), _
AudioRtpRTX::~AudioRtpRTX () { AudioRtpRTX::~AudioRtpRTX () {
_debug("Delete AudioRtpRTX instance\n"); _debug("Delete AudioRtpRTX instance\n");
_start.wait(); // _start.wait();
_debug("Just passed AudioRtpRTX semaphore wait\n"); _debug("Just passed AudioRtpRTX semaphore wait\n");
try { try {
...@@ -186,10 +186,6 @@ AudioRtpRTX::~AudioRtpRTX () { ...@@ -186,10 +186,6 @@ AudioRtpRTX::~AudioRtpRTX () {
} }
_ca = 0; _ca = 0;
_debug("Delete ost::RTPSession in AudioRtpRTX\n");
delete _session; _session = NULL;
_debug("Just killed AudioRtpRTX rtp sessions\n"); _debug("Just killed AudioRtpRTX rtp sessions\n");
delete [] micData; micData = NULL; delete [] micData; micData = NULL;
...@@ -203,6 +199,10 @@ AudioRtpRTX::~AudioRtpRTX () { ...@@ -203,6 +199,10 @@ AudioRtpRTX::~AudioRtpRTX () {
delete converter; converter = NULL; delete converter; converter = NULL;
_debug("Delete ost::RTPSession in AudioRtpRTX\n");
delete _session; _session = NULL;
_debug("AudioRtpRTX instance deleted with all ring buffers, and converters\n"); _debug("AudioRtpRTX instance deleted with all ring buffers, and converters\n");
} }
...@@ -589,7 +589,7 @@ AudioRtpRTX::run () { ...@@ -589,7 +589,7 @@ AudioRtpRTX::run () {
TimerPort::setTimer(threadSleep); TimerPort::setTimer(threadSleep);
_audiolayer->startStream(); _audiolayer->startStream();
_start.post(); // _start.post();
_debug("- ARTP Action: Start call %s\n",_ca->getCallId().c_str()); _debug("- ARTP Action: Start call %s\n",_ca->getCallId().c_str());
while (!testCancel()) { while (!testCancel()) {
......
...@@ -116,7 +116,7 @@ class AudioRtpRTX : public ost::Thread, public ost::TimerPort { ...@@ -116,7 +116,7 @@ class AudioRtpRTX : public ost::Thread, public ost::TimerPort {
ost::SymmetricRTPSession *_session; ost::SymmetricRTPSession *_session;
/** Semaphore */ /** Semaphore */
ost::Semaphore _start; // ost::Semaphore _start;
/** Is the session symmetric or not */ /** Is the session symmetric or not */
bool _sym; bool _sym;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment