mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2026-06-17 14:21:30 +00:00
Fix frame queue corruption when trying to skip a frame with no buffers
This commit is contained in:
+6
-2
@@ -211,14 +211,18 @@ int RtpfAddPacket(PRTP_FEC_QUEUE queue, PRTP_PACKET packet, PRTPFEC_QUEUE_ENTRY
|
|||||||
if (queue->queueTail == NULL) {
|
if (queue->queueTail == NULL) {
|
||||||
queue->queueHead = queue->bufferHead;
|
queue->queueHead = queue->bufferHead;
|
||||||
queue->queueTail = queue->bufferTail;
|
queue->queueTail = queue->bufferTail;
|
||||||
} else {
|
} else if (queue->bufferHead != NULL) {
|
||||||
queue->queueTail->next = queue->bufferHead;
|
queue->queueTail->next = queue->bufferHead;
|
||||||
queue->queueTail = queue->bufferTail;
|
queue->queueTail = queue->bufferTail;
|
||||||
|
} else {
|
||||||
|
LC_ASSERT(queue->bufferTail == NULL);
|
||||||
|
LC_ASSERT(queue->bufferSize == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
queue->bufferHead = NULL;
|
queue->bufferHead = NULL;
|
||||||
queue->bufferTail = NULL;
|
queue->bufferTail = NULL;
|
||||||
|
|
||||||
queue->queueSize = queue->bufferSize;
|
queue->queueSize += queue->bufferSize;
|
||||||
queue->nextRtpSequenceNumber = queue->bufferHighestSequenceNumber;
|
queue->nextRtpSequenceNumber = queue->bufferHighestSequenceNumber;
|
||||||
|
|
||||||
int fecIndex = (nvPacket->fecInfo & 0xFF000) >> 12;
|
int fecIndex = (nvPacket->fecInfo & 0xFF000) >> 12;
|
||||||
|
|||||||
Reference in New Issue
Block a user