Skip to content

Commit

Permalink
Worker: VP8, do not send frames with temporal layer higher than the c…
Browse files Browse the repository at this point in the history
…urrent one

Fixes versatica#989
  • Loading branch information
jmillan committed Jan 31, 2023
1 parent 78c3e89 commit 969f333
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion worker/src/RTC/Codecs/VP8.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand All @@ -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 &&
Expand Down

0 comments on commit 969f333

Please sign in to comment.