mirror of
https://github.com/aler9/gortsplib
synced 2025-10-06 23:52:46 +08:00
rewrite fuzz tests of decoders in order to get deterministic results (#261)
This commit is contained in:
@@ -70,15 +70,15 @@ func TestDecodeADTS(t *testing.T) {
|
||||
}
|
||||
|
||||
func FuzzDecoder(f *testing.F) {
|
||||
d := &Decoder{
|
||||
SampleRate: 16000,
|
||||
SizeLength: 13,
|
||||
IndexLength: 3,
|
||||
IndexDeltaLength: 3,
|
||||
}
|
||||
d.Init()
|
||||
|
||||
f.Fuzz(func(t *testing.T, a []byte, am bool, b []byte, bm bool) {
|
||||
d := &Decoder{
|
||||
SampleRate: 16000,
|
||||
SizeLength: 13,
|
||||
IndexLength: 3,
|
||||
IndexDeltaLength: 3,
|
||||
}
|
||||
d.Init()
|
||||
|
||||
d.Decode(&rtp.Packet{
|
||||
Header: rtp.Header{
|
||||
Version: 2,
|
||||
|
Reference in New Issue
Block a user