Skip to content

Fix for dynacast error#1213

Open
MaxHeimbrock wants to merge 4 commits into
mainfrom
max/fix-dynacast-non-simulcast
Open

Fix for dynacast error#1213
MaxHeimbrock wants to merge 4 commits into
mainfrom
max/fix-dynacast-non-simulcast

Conversation

@MaxHeimbrock

@MaxHeimbrock MaxHeimbrock commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Bug

When using dynacast: black video in calls (no frames ever arrive; the texture stays black) and the test failure (it
times out with zero frames — "no metadata" was really "no frames at all")

Proof: packet_trailer_test.rs fails when dynacast is on

Root cause

set_publishing_layers in client-sdk-rust~/livekit/src/room/track/local_video_track.rs:372 mishandles non-simulcast tracks (one encoding, empty rid):

  1. It maps the empty rid to quality High (video_quality_for_rid_or_default("") → DEFAULT_VIDEO_QUALITY = High). But the SFU addresses layers by spatial index, so a single-layer track's only layer is addressed as Low. Reproduced in the test logs:
    dynacast: SFU quality update for TR_V...: subscribed_codecs="vp8:[Low=true, Medium=false, High=false]"
    dynacast: layers changed -> [(High)=off]
  2. On top of that, a quality missing from the update is treated as "disable" (.unwrap_or(false)), so the mismatch turns the only encoding off. The publisher stops encoding entirely.

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Changeset

The following package versions will be affected by this PR:

Package Bump
livekit patch
livekit-ffi patch

@MaxHeimbrock MaxHeimbrock marked this pull request as ready for review July 2, 2026 10:05
@MaxHeimbrock MaxHeimbrock requested a review from ladvoc as a code owner July 2, 2026 10:05
@stephen-derosa stephen-derosa force-pushed the max/fix-dynacast-non-simulcast branch from c6d1fb5 to 128f39f Compare July 2, 2026 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants