mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2026-10-11 19:14:08 +00:00
Fix RFI after a multi-block frame loss
This commit is contained in:
+8
-3
@@ -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
|
||||
if (!queue->reportedLostFrame) {
|
||||
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->multiFecCurrentBlockNumber = 0;
|
||||
queue->reportedLostFrame = false;
|
||||
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
|
||||
if (!queue->reportedLostFrame) {
|
||||
notifyFrameLost(queue->currentFrameNumber, false);
|
||||
queue->reportedLostFrame = true;
|
||||
notifyFrameLost(nvPacket->frameIndex, false);
|
||||
}
|
||||
|
||||
// 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->multiFecCurrentBlockNumber = 0;
|
||||
queue->reportedLostFrame = false;
|
||||
return RTPF_RET_REJECTED;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user