From afcd146a5bd78d10083a5bf3eb009face24f02b6 Mon Sep 17 00:00:00 2001 From: sudden6 Date: Sat, 23 Apr 2016 22:14:54 +0200 Subject: [PATCH] fix(groupaudio): avoid deadlock when ending groupcall The offending statement caused a deadlock, because the audioLock was locked twice by the audio thread. --- src/core/coreav.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/core/coreav.cpp b/src/core/coreav.cpp index 0e963295b..c865c7d67 100644 --- a/src/core/coreav.cpp +++ b/src/core/coreav.cpp @@ -440,10 +440,9 @@ bool CoreAV::sendGroupCallAudio(int groupId, const int16_t *pcm, size_t samples, ToxGroupCall& call = groupCalls[groupId]; - if (call.inactive || call.muteMic || !Audio::getInstance().isInputReady()) + if (call.inactive || call.muteMic) return true; - if (toxav_group_send_audio(toxav_get_tox(toxav), groupId, pcm, samples, chans, rate) != 0) qDebug() << "toxav_group_send_audio error";