mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2026-10-12 03:24:02 +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
|
// 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user