add AV1 format (#252)

This commit is contained in:
Alessandro Ros
2023-04-15 13:10:56 +02:00
committed by GitHub
parent f5aedf9b7f
commit fee147222e
6 changed files with 155 additions and 0 deletions

View File

@@ -578,6 +578,29 @@ var casesFormat = []struct {
"profile-id": "789",
},
},
{
"video av1",
"video",
96,
"AV1/90000",
map[string]string{
"profile": "2",
"level-idx": "8",
"tier": "1",
},
&AV1{
PayloadTyp: 96,
Profile: intPtr(2),
LevelIdx: intPtr(8),
Tier: intPtr(1),
},
"AV1/90000",
map[string]string{
"profile": "2",
"level-idx": "8",
"tier": "1",
},
},
{
"application",
"application",
@@ -764,6 +787,23 @@ func TestUnmarshalMPEG4AudioLATMErrors(t *testing.T) {
require.Error(t, err)
}
func TestUnmarshalAV1Errors(t *testing.T) {
_, err := Unmarshal("video", 96, "AV1/90000", map[string]string{
"level-idx": "aaa",
})
require.Error(t, err)
_, err = Unmarshal("video", 96, "AV1/90000", map[string]string{
"profile": "aaa",
})
require.Error(t, err)
_, err = Unmarshal("video", 96, "AV1/90000", map[string]string{
"tier": "aaa",
})
require.Error(t, err)
}
func FuzzUnmarshalH264(f *testing.F) {
f.Fuzz(func(t *testing.T, sps string, pktMode string) {
Unmarshal("video", 96, "H264/90000", map[string]string{