improve coverage (#168)

This commit is contained in:
Alessandro Ros
2023-01-06 23:34:10 +01:00
committed by GitHub
parent a759ba9d01
commit 2e88705875
195 changed files with 535 additions and 63 deletions

View File

@@ -1,6 +1,7 @@
package h264
import (
"bytes"
"testing"
"github.com/stretchr/testify/require"
@@ -125,6 +126,11 @@ func TestAnnexBUnmarshalError(t *testing.T) {
[]byte{0x00, 0x00, 0x01, 0xaa, 0x00, 0x00, 0x01},
"empty NALU",
},
{
"too many nalus",
bytes.Repeat([]byte{0x00, 0x00, 0x01, 0x0a}, 21),
"NALU count (21) exceeds maximum allowed (20)",
},
} {
t.Run(ca.name, func(t *testing.T) {
_, err := AnnexBUnmarshal(ca.enc)