1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Properly exit CoreAV thread

This commit is contained in:
tux3 2015-10-25 13:53:04 +01:00
parent c902543ae4
commit f107858252
No known key found for this signature in database
GPG Key ID: 7E086DD661263264

View File

@ -28,6 +28,7 @@
#include <QThread>
#include <QTimer>
#include <QDebug>
#include <QCoreApplication>
#ifdef QTOX_FILTER_AUDIO
#include "src/audio/audiofilterer.h"
@ -65,6 +66,12 @@ CoreAV::~CoreAV()
cancelCall(call.callId);
killTimerFromThread();
toxav_kill(toxav);
coreavThread->exit(0);
while (coreavThread->isRunning())
{
qApp->processEvents();
coreavThread->wait(100);
}
}
const ToxAV *CoreAV::getToxAv() const