mirror of
https://github.com/aler9/gortsplib
synced 2025-10-15 03:30:47 +08:00
improve coverage (#168)
This commit is contained in:
@@ -165,3 +165,21 @@ func TestDTSExtractor(t *testing.T) {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func FuzzDTSExtractor(f *testing.F) {
|
||||
ex := NewDTSExtractor()
|
||||
f.Fuzz(func(t *testing.T, b []byte, p uint64) {
|
||||
if len(b) < 1 {
|
||||
return
|
||||
}
|
||||
ex.Extract([][]byte{
|
||||
{ // SPS
|
||||
0x27, 0x64, 0x00, 0x20, 0xac, 0x52, 0x18, 0x0f,
|
||||
0x01, 0x17, 0xef, 0xff, 0x00, 0x01, 0x00, 0x01,
|
||||
0x6a, 0x02, 0x02, 0x03, 0x6d, 0x85, 0x6b, 0xde,
|
||||
0xf8, 0x08,
|
||||
},
|
||||
b,
|
||||
}, time.Duration(p))
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user