Open braams opened 4 weeks ago
I'm trying to use jitter buffer interceptor.
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.
If even one packet was lost, all subsequent reads will return an error.
The interceptor does not handle the situation with the absence of the next packet and does not shift the expected packet number https://github.com/pion/interceptor/blob/142f17f90b527434b62ce2fd92676e6e262cd807/pkg/jitterbuffer/receiver_interceptor.go#L73 It looks like we should add something like this:
if errors.Is(err, ErrNotFound) { i.buffer.SetPlayoutHead(i.buffer.PlayoutHead() + 1) }
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 https://github.com/pion/interceptor/blob/142f17f90b527434b62ce2fd92676e6e262cd807/pkg/jitterbuffer/receiver_interceptor.go#L73 It looks like we should add something like this: