Improve SPS parser

This commit is contained in:
Alex X
2023-10-14 08:11:03 +03:00
parent d09d21434b
commit bfae16f3a0
2 changed files with 33 additions and 3 deletions
+10
View File
@@ -5,6 +5,7 @@ import (
"encoding/hex"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
@@ -83,3 +84,12 @@ func TestGetProfileLevelID(t *testing.T) {
profile = GetProfileLevelID(s)
require.Equal(t, "640029", profile)
}
func TestDecodeSPS2(t *testing.T) {
s := "6764001fad84010c20086100430802184010c200843b50740932"
b, err := hex.DecodeString(s)
require.Nil(t, err)
sps := DecodeSPS(b)
assert.Nil(t, sps) // broken SPS?
}