|
|
|
@ -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);
|
|
|
|
|