mirror of
https://github.com/aler9/gortsplib
synced 2025-10-05 23:26:54 +08:00
rewrite fuzz tests of decoders in order to get deterministic results (#261)
This commit is contained in:
@@ -31,14 +31,14 @@ func TestDecode(t *testing.T) {
|
||||
}
|
||||
|
||||
func FuzzDecoder(f *testing.F) {
|
||||
d := &Decoder{
|
||||
BitDepth: 24,
|
||||
SampleRate: 48000,
|
||||
ChannelCount: 2,
|
||||
}
|
||||
d.Init()
|
||||
|
||||
f.Fuzz(func(t *testing.T, b []byte) {
|
||||
d := &Decoder{
|
||||
BitDepth: 24,
|
||||
SampleRate: 48000,
|
||||
ChannelCount: 2,
|
||||
}
|
||||
d.Init()
|
||||
|
||||
d.Decode(&rtp.Packet{
|
||||
Header: rtp.Header{
|
||||
Version: 2,
|
||||
|
Reference in New Issue
Block a user