Fix frame queue corruption when trying to skip a frame with no buffers
This commit is contained in:
parent
1439d53619
commit
8a2b24e57a
1 changed files with 6 additions and 2 deletions
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue