mirror of
https://github.com/danog/libtgvoip.git
synced 2024-11-26 12:14:39 +01:00
Avoid backwards compatiblity issues due to reliable ping
This commit is contained in:
parent
d2244c5856
commit
18c7f84476
@ -283,6 +283,7 @@ void VoIPController::UpdateAudioBitrate()
|
||||
}
|
||||
else if (act == TGVOIP_CONCTL_ACT_DECREASE)
|
||||
{
|
||||
LOGE("==== DECREASING BITRATE ======");
|
||||
uint32_t bitrate = encoder->GetBitrate();
|
||||
if (bitrate > 8000)
|
||||
encoder->SetBitrate(bitrate < (minAudioBitrate + audioBitrateStepDecr) ? minAudioBitrate : (bitrate - audioBitrateStepDecr));
|
||||
|
@ -189,7 +189,7 @@ void Packet::serializeLegacy(std::vector<std::pair<Buffer, bool>> &outArray, con
|
||||
writePacketHeaderLegacyLegacy(out, ver, legacySeq, ackSeq, ackMask, type, accumulator.GetLength(), allowedExtras, state, callID);
|
||||
out.WriteBytes(accumulator.GetBuffer(), accumulator.GetLength());
|
||||
}
|
||||
outArray.push_back(std::make_pair(Buffer(std::move(out)), true));
|
||||
outArray.push_back(std::make_pair(Buffer(std::move(out)), !(type == PKT_PING || type == PKT_PONG)));
|
||||
legacySeq++;
|
||||
}
|
||||
// Convert from mask to array
|
||||
@ -318,7 +318,7 @@ void Packet::writePacketHeaderLegacy(BufferOutputStream &out, const VersionInfo
|
||||
out.WriteByte(static_cast<unsigned char>(extras.size()));
|
||||
for (auto &x : extras)
|
||||
{
|
||||
LOGV("Writing extra into header: type %u", x.getID());
|
||||
//LOGV("Writing extra into header: type %u", x.getID());
|
||||
out.Write(x, ver);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user