-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix spatial layer switch with unordered packets #823
Merged
ibc
merged 7 commits into
versatica:v3
from
jcague:fix/spatial_layer_switch_unordered_packets
Jun 3, 2022
Merged
Fix spatial layer switch with unordered packets #823
ibc
merged 7 commits into
versatica:v3
from
jcague:fix/spatial_layer_switch_unordered_packets
Jun 3, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ggarber
reviewed
May 18, 2022
ibc
reviewed
May 30, 2022
@jmillan any other concern here? Ready to merge? |
I'll check it tomorrow. |
jmillan
approved these changes
Jun 3, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
ibc
approved these changes
Jun 3, 2022
Thanks. Released in mediasoup 3.9.16. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've seen sporadic corrupted frames when debugging VP8 Simulcast locally. I recorded a couple of cases here:
https://user-images.githubusercontent.com/557698/168805998-dada1fc0-a47b-4383-b46d-d0a0052fc342.mov
and here
https://user-images.githubusercontent.com/557698/168805983-95f2942c-fd92-4a6c-b89b-d2315ff0f41d.mov
In these cases I saw the same pattern:
We forward frames belonging to layer 0 following their sequence number, but there is a sequence number gap in the target spatial layer (due to packet losses or reorder) just before the keyframe that acts as the sync packet. In that case, if we receive the packets that were previously lost we will forward them to the consumer, and the browser will render a broken frame.
The impact is quite limited as it usually ends up showing just a corrupted frame.
This is what happens to the traffic:
As a result, the browser will decode:
Here I propose a solution to avoid sending packets with sequence numbers lower than the first keyframe which was the sync packet.