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:
@@ -34,27 +34,3 @@ func TestOpusDecEncoder(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, []byte{0x01, 0x02, 0x03, 0x04}, byts)
|
||||
}
|
||||
|
||||
func FuzzUnmarshalOpus(f *testing.F) {
|
||||
f.Add("48000/a")
|
||||
|
||||
f.Fuzz(func(_ *testing.T, a string) {
|
||||
fo, err := Unmarshal("audio", 96, "Opus/"+a, nil)
|
||||
if err == nil {
|
||||
fo.RTPMap()
|
||||
fo.FMTP()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
func FuzzUnmarshalOpusMulti(f *testing.F) {
|
||||
f.Add("48000/a")
|
||||
|
||||
f.Fuzz(func(_ *testing.T, a string) {
|
||||
fo, err := Unmarshal("audio", 96, "multiopus/"+a, nil)
|
||||
if err == nil {
|
||||
fo.RTPMap()
|
||||
fo.FMTP()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user