mirror of
https://github.com/aler9/gortsplib
synced 2025-10-16 04:00:46 +08:00
simplify format.Unmarshal; improve tests (#631)
This commit is contained in:
@@ -71,40 +71,6 @@ func TestH265DecEncoder(t *testing.T) {
|
||||
require.Equal(t, [][]byte{{0x01, 0x02, 0x03, 0x04}}, byts)
|
||||
}
|
||||
|
||||
func FuzzUnmarshalH265(f *testing.F) {
|
||||
f.Fuzz(func(
|
||||
_ *testing.T,
|
||||
a bool,
|
||||
b string,
|
||||
c bool,
|
||||
d string,
|
||||
) {
|
||||
ma := map[string]string{}
|
||||
|
||||
if a {
|
||||
ma["sprop-vps"] = b
|
||||
}
|
||||
|
||||
if c {
|
||||
ma["sprop-sps"] = d
|
||||
}
|
||||
|
||||
if c {
|
||||
ma["sprop-pps"] = d
|
||||
}
|
||||
|
||||
if c {
|
||||
ma["sprop-max-don-diff"] = d
|
||||
}
|
||||
|
||||
fo, err := Unmarshal("video", 96, "H265/90000", ma)
|
||||
if err == nil {
|
||||
fo.RTPMap()
|
||||
fo.FMTP()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
func FuzzH265PTSEqualsDTS(f *testing.F) {
|
||||
f.Fuzz(func(t *testing.T, b []byte) {
|
||||
(&H265{}).PTSEqualsDTS(&rtp.Packet{Payload: b})
|
||||
|
Reference in New Issue
Block a user