Skip to content

fix: associate receiver codec stats by codecId - #1223

Open
bdlukaa wants to merge 1 commit into
livekit:mainfrom
totem-technologies:fix/receiver-stats-codec-association
Open

bdlukaa wants to merge 1 commit into
livekit:mainfrom
totem-technologies:fix/receiver-stats-codec-association

Conversation

@bdlukaa

@bdlukaa bdlukaa commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

Problem

RemoteVideoTrack.getReceiverStats() takes codec metadata from the first codec stats report. A receiver can return multiple codec reports, so report order can cause the inbound video stats to be labeled with an unrelated codec.

Reproduction

Return two codec reports with the unrelated one first, and an inbound-rtp report whose codecId references the second. The previous implementation reports metadata from the first codec.

Fix

Look up the codec report whose ID matches the selected inbound RTP report's codecId. If the ID or matching report is unavailable, leave codec metadata unset rather than guessing.

@bdlukaa
bdlukaa marked this pull request as ready for review September 24, 2026 20:57

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Devin Review: 1 flag

Not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)

Devin Review

This branch has not been deployed

No deployments
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.

1 participant