Skip to content
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

The Jitter buffer iterceptor doesn't handle packet loss #256

Open
braams opened this issue Jun 5, 2024 · 1 comment · May be fixed by #258
Open

The Jitter buffer iterceptor doesn't handle packet loss #256

braams opened this issue Jun 5, 2024 · 1 comment · May be fixed by #258
Assignees

Comments

@braams
Copy link

braams commented Jun 5, 2024

Your environment.

What did you do?

I'm trying to use jitter buffer interceptor.

What did you expect?

I expect to get an error on read if the current packet was lost. And I expect to get the next packet on the next read.

What happened?

If even one packet was lost, all subsequent reads will return an error.

The reason

The interceptor does not handle the situation with the absence of the next packet and does not shift the expected packet number


It looks like we should add something like this:

if errors.Is(err, ErrNotFound) {
	i.buffer.SetPlayoutHead(i.buffer.PlayoutHead() + 1)
}
@thatsnotright thatsnotright self-assigned this Aug 30, 2024
@thatsnotright
Copy link
Contributor

@braams My intent here was that the user of the jitter buffer is in the best position to decide the next step. If a packet is lost and it's appropriate to retransmit then all of that has to be done outside the jitter buffer context. If you wish to skip the dropped packet then call SetPlayoutHead to skip the unrecoverable packets. I'm definitely open to suggestions or improvements here, and if adding an option to skip missed packets is helpful we can discuss what that might look like!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants