1
0
mirror of https://github.com/danog/libtgvoip.git synced 2024-11-26 20:24:38 +01:00
This commit is contained in:
Grishka 2018-11-10 04:05:47 +03:00
parent 296187a443
commit 81daf3f26c
2 changed files with 2 additions and 1 deletions

View File

@ -51,6 +51,7 @@ JitterBuffer::~JitterBuffer(){
}
void JitterBuffer::SetMinPacketCount(uint32_t count){
LOGI("jitter: set min packet count %u", count);
minDelay=count;
minMinDelay=count;
//Reset();

View File

@ -1477,7 +1477,7 @@ simpleAudioBlock random_id:long random_bytes:string raw_data:string = DecryptedA
if(stm->type==STREAM_TYPE_AUDIO){
stm->jitterBuffer=make_shared<JitterBuffer>(nullptr, stm->frameDuration);
if(stm->frameDuration>50)
stm->jitterBuffer->SetMinPacketCount((uint32_t) ServerConfig::GetSharedInstance()->GetInt("jitter_initial_delay_60", 3));
stm->jitterBuffer->SetMinPacketCount((uint32_t) ServerConfig::GetSharedInstance()->GetInt("jitter_initial_delay_60", 2));
else if(stm->frameDuration>30)
stm->jitterBuffer->SetMinPacketCount((uint32_t) ServerConfig::GetSharedInstance()->GetInt("jitter_initial_delay_40", 4));
else