mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2026-10-26 14:00:08 +00:00
Fix an RTP queue bug that can cause extended packet delays when the last packet ages out of the queue
This commit is contained in:
1 parent
8bd6582d07
commit
d3a7bba666
1 file changed
+7
@@ -171,6 +171,13 @@ public class RtpReorderQueue {
|
|||||||
// Validate that the queue remains within our contraints
|
// Validate that the queue remains within our contraints
|
||||||
RtpQueueEntry lowestEntry = validateQueueConstraints();
|
RtpQueueEntry lowestEntry = validateQueueConstraints();
|
||||||
|
|
||||||
|
// If the queue is now empty after validating queue constraints,
|
||||||
|
// this packet can be returned immediately
|
||||||
|
if (lowestEntry == null && queue.isEmpty()) {
|
||||||
|
nextRtpSequenceNumber = (short) (packet.getRtpSequenceNumber() + 1);
|
||||||
|
return RtpQueueStatus.HANDLE_IMMEDIATELY;
|
||||||
|
}
|
||||||
|
|
||||||
// Queue has data inside, so we need to see where this packet fits
|
// Queue has data inside, so we need to see where this packet fits
|
||||||
if (packet.getRtpSequenceNumber() == nextRtpSequenceNumber) {
|
if (packet.getRtpSequenceNumber() == nextRtpSequenceNumber) {
|
||||||
// It fits in a hole where we need a packet, now we have some ready
|
// It fits in a hole where we need a packet, now we have some ready
|
||||||
|
|||||||
Reference in new issue
Block a user