Fix RFI after a multi-block frame loss

This commit is contained in:
Cameron Gutman
2026-09-08 22:48:59 -05:00
parent 874ac9548f
commit d85371cd8c
+8 -3
View File
@@ -617,11 +617,13 @@ int RtpvAddPacket(PRTP_VIDEO_QUEUE queue, PRTP_PACKET packet, int length, PRTPV_
// Notify the host of the loss of this frame // Notify the host of the loss of this frame
if (!queue->reportedLostFrame) { if (!queue->reportedLostFrame) {
notifyFrameLost(queue->currentFrameNumber, false); notifyFrameLost(queue->currentFrameNumber, false);
queue->reportedLostFrame = true;
} }
// NB: We reset reportedLostFrame here because we don't want to suppress
// the reporting of the _next_ frame if it's lost.
queue->currentFrameNumber++; queue->currentFrameNumber++;
queue->multiFecCurrentBlockNumber = 0; queue->multiFecCurrentBlockNumber = 0;
queue->reportedLostFrame = false;
return RTPF_RET_REJECTED; return RTPF_RET_REJECTED;
} }
} }
@@ -652,13 +654,16 @@ int RtpvAddPacket(PRTP_VIDEO_QUEUE queue, PRTP_PACKET packet, int length, PRTPV_
// Notify the host of the loss of this frame // Notify the host of the loss of this frame
if (!queue->reportedLostFrame) { if (!queue->reportedLostFrame) {
notifyFrameLost(queue->currentFrameNumber, false); notifyFrameLost(nvPacket->frameIndex, false);
queue->reportedLostFrame = true;
} }
// We dropped a block of this frame, so we must skip to the next one. // We dropped a block of this frame, so we must skip to the next one.
//
// NB: We reset reportedLostFrame here because we don't want to suppress
// the reporting of the _next_ frame if it's lost.
queue->currentFrameNumber = nvPacket->frameIndex + 1; queue->currentFrameNumber = nvPacket->frameIndex + 1;
queue->multiFecCurrentBlockNumber = 0; queue->multiFecCurrentBlockNumber = 0;
queue->reportedLostFrame = false;
return RTPF_RET_REJECTED; return RTPF_RET_REJECTED;
} }