Improve debug output during frame loss

This commit is contained in:
Cameron Gutman 2017-06-07 22:49:54 -07:00
parent 6b2de18481
commit 965657523d
2 changed files with 9 additions and 1 deletions

View File

@ -528,7 +528,7 @@ static void requestInvalidateReferenceFrames(void) {
return;
}
Limelog("Invalidate reference frame request sent\n");
Limelog("Invalidate reference frame request sent (%d to %d)\n", (int)payload[0], (int)payload[1]);
}
static void invalidateRefFramesFunc(void* context) {

View File

@ -236,6 +236,14 @@ int RtpfAddPacket(PRTP_FEC_QUEUE queue, PRTP_PACKET packet, PRTPFEC_QUEUE_ENTRY
// Reinitialize the queue if it's empty after a frame delivery or
// if we can't finish a frame before receiving the next one.
if (queue->bufferSize == 0 || queue->currentFrameNumber != nvPacket->frameIndex) {
if (queue->currentFrameNumber != nvPacket->frameIndex && queue->bufferSize != 0) {
Limelog("Unrecoverable frame %d: %d+%d=%d received < %d needed\n",
queue->currentFrameNumber, queue->receivedBufferDataPackets,
queue->bufferSize - queue->receivedBufferDataPackets,
queue->bufferSize,
queue->bufferDataPackets);
}
queue->currentFrameNumber = nvPacket->frameIndex;
queue->nextRtpSequenceNumber = queue->bufferHighestSequenceNumber;