mirror of
https://github.com/aler9/gortsplib
synced 2025-10-05 23:26:54 +08:00
simplify format.Unmarshal; improve tests (#631)
This commit is contained in:
@@ -33,35 +33,3 @@ func TestVP9DecEncoder(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, []byte{0x82, 0x49, 0x83, 0x42, 0x0, 0x77, 0xf0, 0x32, 0x34}, byts)
|
||||
}
|
||||
|
||||
func FuzzUnmarshalVP9(f *testing.F) {
|
||||
f.Fuzz(func(
|
||||
_ *testing.T,
|
||||
a bool,
|
||||
b string,
|
||||
c bool,
|
||||
d string,
|
||||
e bool,
|
||||
f string,
|
||||
) {
|
||||
ma := map[string]string{}
|
||||
|
||||
if a {
|
||||
ma["max-fr"] = b
|
||||
}
|
||||
|
||||
if c {
|
||||
ma["max-fs"] = d
|
||||
}
|
||||
|
||||
if e {
|
||||
ma["profile-id"] = f
|
||||
}
|
||||
|
||||
fo, err := Unmarshal("audio", 96, "VP9/90000", ma)
|
||||
if err == nil {
|
||||
fo.RTPMap()
|
||||
fo.FMTP()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user