mirror of
https://github.com/pion/webrtc.git
synced 2025-10-05 15:16:52 +08:00
SampleBuilder: Port to use jitter buffer
This commit is contained in:
@@ -394,14 +394,18 @@ func TestSampleBuilderCleanReference(t *testing.T) {
|
||||
s.Push(pkt5)
|
||||
|
||||
for i := 0; i < 3; i++ {
|
||||
if s.buffer[(i+int(seqStart))%0x10000] != nil {
|
||||
pkt, err := s.buffer.PeekAtSequence(uint16((i + int(seqStart)) % 0x10000))
|
||||
|
||||
if pkt != nil || err == nil {
|
||||
t.Errorf("Old packet (%d) is not unreferenced (maxLate: 10, pushed: 12)", i)
|
||||
}
|
||||
}
|
||||
if s.buffer[(14+int(seqStart))%0x10000] != pkt4 {
|
||||
pkt, err := s.buffer.PeekAtSequence(uint16((14 + int(seqStart)) % 0x10000))
|
||||
if pkt != pkt4 || err != nil {
|
||||
t.Error("New packet must be referenced after jump")
|
||||
}
|
||||
if s.buffer[(12+int(seqStart))%0x10000] != pkt5 {
|
||||
pkt, err = s.buffer.PeekAtSequence(uint16((12 + int(seqStart)) % 0x10000))
|
||||
if pkt != pkt5 || err != nil {
|
||||
t.Error("New packet must be referenced after jump")
|
||||
}
|
||||
})
|
||||
|
Reference in New Issue
Block a user