From 64276ceb966df364ca30488f7f453d38d50b0dc9 Mon Sep 17 00:00:00 2001 From: Grishka Date: Fri, 28 Apr 2017 15:42:48 +0300 Subject: [PATCH] Fixed deadlock --- OpusDecoder.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/OpusDecoder.cpp b/OpusDecoder.cpp index 36d8de3..e1698d6 100644 --- a/OpusDecoder.cpp +++ b/OpusDecoder.cpp @@ -167,10 +167,6 @@ void tgvoip::OpusDecoder::RunThread(){ size_t nextLen=0; while(running){ //LOGV("after wait, running=%d", running); - if(!running){ - LOGI("==== decoder exiting ===="); - return; - } //LOGD("Will get %d packets", packetsNeeded); //lastDecodedLen=0; memcpy(buffer, nextBuffer, nextLen); @@ -200,6 +196,10 @@ void tgvoip::OpusDecoder::RunThread(){ //LOGV("After decode, size=%d", size); for(i=0;iGet(); if(buf){ if(size>0){