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:
parent
c902543ae4
commit
f107858252
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user