Commit f0f2c46f authored by Tristan Matthews's avatar Tristan Matthews

* #14176: video: destory sip_thread_client earlier

parent 257e154e
...@@ -44,7 +44,11 @@ SIPThreadClient::~SIPThreadClient() ...@@ -44,7 +44,11 @@ SIPThreadClient::~SIPThreadClient()
{ {
if (thread_) { if (thread_) {
WARN("Destroying thread handle"); WARN("Destroying thread handle");
pj_thread_join(thread_); if (pj_thread_join(thread_) != PJ_SUCCESS) {
pj_thread_destroy(thread_); ERROR("Error on thread join");
} else if (pj_thread_destroy(thread_) != PJ_SUCCESS) {
ERROR("Error on thread destroy");
}
thread_ = 0;
} }
} }
...@@ -285,12 +285,12 @@ void VideoReceiveThread::run() ...@@ -285,12 +285,12 @@ void VideoReceiveThread::run()
} }
yield(); yield();
} }
sipThreadClient_.reset();
} }
VideoReceiveThread::~VideoReceiveThread() VideoReceiveThread::~VideoReceiveThread()
{ {
receiving_ = false; receiving_ = false;
sipThreadClient_.reset(0);
Manager::instance().getVideoControls()->stoppedDecoding(id_, sink_.openedName()); Manager::instance().getVideoControls()->stoppedDecoding(id_, sink_.openedName());
ost::Thread::terminate(); ost::Thread::terminate();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment