Don't speculatively report losses if RFI is disabled

Not only does it unnecessarily cause guaranteed loss of the target frame, it can lead to 120 consecutive frames dropped if we fully receive that frame since we've already triggered an IDR frame wait but didn't tell the depacketizer to request an IDR frame.

Closes #147
This commit is contained in:
Cameron Gutman
2026-09-08 23:25:43 -05:00
parent be438856af
commit 62e066388f
+1 -1
View File
@@ -212,7 +212,7 @@ static int reconstructFrame(PRTP_VIDEO_QUEUE queue) {
// based on the packets we've received (or not) so far. If the number of missing shards exceeds the total
// needed shards, there is no hope of recovering the data. The only way we could recover this frame is by
// receiving OOS data, which is unlikely because we've not seen any recently from this host.
if (!queue->reportedLostFrame && !queue->receivedOosData) {
if (isReferenceFrameInvalidationEnabled() && !queue->reportedLostFrame && !queue->receivedOosData) {
// NB: We use totalPackets - neededPackets instead of just bufferParityPackets here because we require
// one extra parity shard for recovery if we're in FEC validation mode.
if (queue->missingPackets > totalPackets - neededPackets) {