From dbfbc919715f5b7dadebc8e113350e313bace436 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Mon, 3 Oct 2022 18:27:57 -0500 Subject: [PATCH] Explicitly request an IDR frame in the IDR frame wait path --- src/VideoDepacketizer.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/VideoDepacketizer.c b/src/VideoDepacketizer.c index 3baefbe..6380e03 100644 --- a/src/VideoDepacketizer.c +++ b/src/VideoDepacketizer.c @@ -839,11 +839,11 @@ static void processRtpPayload(PNV_VIDEO_PACKET videoPacket, int length, if (waitingForIdrFrame) { Limelog("Waiting for IDR frame\n"); - // If waiting for next successful frame and we got here - // with an end flag, we can send a message to the server + // We wait for the first fully received frame after a loss to approximate + // detection of the recovery of the network. Requesting an IDR frame while + // the network is unstable will just contribute to congestion collapse. if (waitingForNextSuccessfulFrame) { - // This is the next successful frame after a loss event - connectionDetectedFrameLoss(startFrameNumber, frameIndex); + requestIdrOnDemand(); } } else {