Skip to content

Refactor merging of additional TSN blocks#13

Merged
boivie merged 1 commit intowebrtc:mainfrom
boivie:refactor
Aug 21, 2025
Merged

Refactor merging of additional TSN blocks#13
boivie merged 1 commit intowebrtc:mainfrom
boivie:refactor

Conversation

@boivie
Copy link
Copy Markdown
Collaborator

@boivie boivie commented Aug 21, 2025

The logic for adding new TSNs to the list of received blocks was complex and difficult to follow. It involved a binary search followed by multiple conditional checks to determine how to merge the new TSN with existing blocks.

This commit refactors the add_additional_tsn method to be more readable and efficient. It now finds the correct insertion point for the new TSN and then uses a simple match statement to handle merging with the previous block, the next, both, or neither.

@boivie boivie requested a review from lndmrk August 21, 2025 09:29
The logic for adding new TSNs to the list of received blocks was complex
and difficult to follow. It involved a binary search followed by
multiple conditional checks to determine how to merge the new TSN with
existing blocks.

This commit refactors the `add_additional_tsn` method to be more
readable and efficient. It now finds the correct insertion point for the
new TSN and then uses a simple match statement to handle merging with
the previous block, the next, both, or neither.
@boivie boivie merged commit ca64719 into webrtc:main Aug 21, 2025
6 checks passed
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.

2 participants