* #14176: video: destory sip_thread_client earlier

This commit is contained in:
Tristan Matthews
2012-08-02 14:24:40 -04:00
parent 257e154eaa
commit f0f2c46fa8
2 changed files with 7 additions and 3 deletions

View File

@ -44,7 +44,11 @@ SIPThreadClient::~SIPThreadClient()
{
if (thread_) {
WARN("Destroying thread handle");
pj_thread_join(thread_);
pj_thread_destroy(thread_);
if (pj_thread_join(thread_) != PJ_SUCCESS) {
ERROR("Error on thread join");
} else if (pj_thread_destroy(thread_) != PJ_SUCCESS) {
ERROR("Error on thread destroy");
}
thread_ = 0;
}
}

View File

@ -285,12 +285,12 @@ void VideoReceiveThread::run()
}
yield();
}
sipThreadClient_.reset();
}
VideoReceiveThread::~VideoReceiveThread()
{
receiving_ = false;
sipThreadClient_.reset(0);
Manager::instance().getVideoControls()->stoppedDecoding(id_, sink_.openedName());
ost::Thread::terminate();