mirror of
https://github.com/aler9/gortsplib
synced 2025-10-07 08:01:14 +08:00
improve fuzz tests (#591)
This commit is contained in:
@@ -37,3 +37,25 @@ func TestMPEG4VideoDecEncoder(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, []byte{0x01, 0x02, 0x03, 0x04}, byts)
|
||||
}
|
||||
|
||||
func FuzzUnmarshalMPEG4Video(f *testing.F) {
|
||||
f.Fuzz(func(
|
||||
_ *testing.T,
|
||||
a bool,
|
||||
b string,
|
||||
c bool,
|
||||
d string,
|
||||
) {
|
||||
ma := map[string]string{}
|
||||
|
||||
if a {
|
||||
ma["profile-level-id"] = b
|
||||
}
|
||||
|
||||
if c {
|
||||
ma["config"] = d
|
||||
}
|
||||
|
||||
Unmarshal("audio", 96, "MP4V-ES/90000", ma) //nolint:errcheck
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user