From fff41f5892352edce9f8b0af2af6bab689e7689a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?I=C3=B1aki=20Baz=20Castillo?= Date: Tue, 31 Jan 2023 10:09:51 +0100 Subject: [PATCH] SimulcastConsumer: Fix frozen video when syncing keyframe is discarded due to too high RTP timestamp extra offset needed - It may fix #990. - Rationale here: https://github.com/versatica/mediasoup/issues/990#issuecomment-1409997273. - Basically we should reset this->syncRequired` nor `this->spatialLayerToSync` when the keyframe that is supposed to switch to another spatial layer is discarded due to too high RTP timestamp extra offset needed. --- worker/src/RTC/SimulcastConsumer.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/worker/src/RTC/SimulcastConsumer.cpp b/worker/src/RTC/SimulcastConsumer.cpp index ef2e26e253..a129555bb9 100644 --- a/worker/src/RTC/SimulcastConsumer.cpp +++ b/worker/src/RTC/SimulcastConsumer.cpp @@ -809,6 +809,10 @@ namespace RTC this->keyFrameForTsOffsetRequested = true; + // Reset flags since we are discarding this key frame. + this->syncRequired = false; + this->spatialLayerToSync = -1; + return; }