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

* #14176: video: destory sip_thread_client earlier

parent 257e154e
No related branches found
No related tags found
No related merge requests found
...@@ -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();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment