cleanup typo and bad spacing due to bad VSCode configuration; correct memory leak when handling buffer drop due to new stream packet wraparound;

pull/114/head
Bryan Biedenkapp 3 months ago
parent 4d08586f64
commit 7a39cdda2d

@ -97,8 +97,15 @@ bool AdaptiveJitterBuffer::processFrame(uint16_t seq, const uint8_t* data, uint3
if (diff < 0) { if (diff < 0) {
// check if it's severely out of order (> 1000 packets behind) // check if it's severely out of order (> 1000 packets behind)
if (diff < -1000) { if (diff < -1000) {
// ;ikely a sequence wraparound with new stream - reset // likely a sequence wraparound with new stream - reset
m_nextExpectedSeq = seq; m_nextExpectedSeq = seq;
// cleanup any buffered frames, delete and clear list
for (auto& pair : m_buffer) {
if (pair.second != nullptr) {
delete pair.second;
}
}
m_buffer.clear(); m_buffer.clear();
BufferedFrame* frame = new BufferedFrame(seq, data, length); BufferedFrame* frame = new BufferedFrame(seq, data, length);

Loading…
Cancel
Save

Powered by TurnKey Linux.