From 26ee0df7df8468e825195fb41b61abc083400697 Mon Sep 17 00:00:00 2001 From: Junlong Zou Date: Mon, 20 May 2024 01:56:14 +0800 Subject: [PATCH] fix increase layer when current layer has not receive SR (#1098) --- worker/src/RTC/SimulcastConsumer.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/worker/src/RTC/SimulcastConsumer.cpp b/worker/src/RTC/SimulcastConsumer.cpp index 6151a1c0b8..c0633ca636 100644 --- a/worker/src/RTC/SimulcastConsumer.cpp +++ b/worker/src/RTC/SimulcastConsumer.cpp @@ -366,11 +366,11 @@ namespace RTC MS_DEBUG_TAG(simulcast, "first SenderReport [ssrc:%" PRIu32 "]", rtpStream->GetSsrc()); - // If our current selected RTP stream does not yet have SR, do nothing since - // we know we won't be able to switch. - auto* producerCurrentRtpStream = GetProducerCurrentRtpStream(); + // If our RTP timestamp reference stream does not yet have SR, do nothing + // since we know we won't be able to switch. + auto* producerTsReferenceRtpStream = GetProducerTsReferenceRtpStream(); - if (!producerCurrentRtpStream || !producerCurrentRtpStream->GetSenderReportNtpMs()) + if (!producerTsReferenceRtpStream || !producerTsReferenceRtpStream->GetSenderReportNtpMs()) { return; }