From 969f33338b1c0268a95e204270f79312caad892a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Luis=20Mill=C3=A1n?= Date: Tue, 31 Jan 2023 17:32:05 +0100 Subject: [PATCH] Worker: VP8, do not send frames with temporal layer higher than the current one Fixes #989 --- worker/src/RTC/Codecs/VP8.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/worker/src/RTC/Codecs/VP8.cpp b/worker/src/RTC/Codecs/VP8.cpp index 3d5a2139ca..9136df0ab2 100644 --- a/worker/src/RTC/Codecs/VP8.cpp +++ b/worker/src/RTC/Codecs/VP8.cpp @@ -325,7 +325,7 @@ namespace RTC // clang-format off if ( this->payloadDescriptor->hasTlIndex && - this->payloadDescriptor->tlIndex > context->GetCurrentTemporalLayer() + this->payloadDescriptor->tlIndex == context->GetTargetTemporalLayer() ) // clang-format on { @@ -339,6 +339,12 @@ namespace RTC if (context->GetCurrentTemporalLayer() > context->GetTargetTemporalLayer()) context->SetCurrentTemporalLayer(context->GetTargetTemporalLayer()); + // Do not send tlIndex higher than current one. + if (this->payloadDescriptor->tlIndex > context->GetCurrentTemporalLayer()) + { + return false; + } + // clang-format off if ( this->payloadDescriptor->hasPictureId &&