Skip to content

Commit

Permalink
fix test code
Browse files Browse the repository at this point in the history
  • Loading branch information
hsnks100 committed Jan 10, 2024
1 parent 0c11813 commit 9f2ad56
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
9 changes: 6 additions & 3 deletions pkg/codecs/h264/sps_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ func TestSPSUnmarshal(t *testing.T) {
},
SPS{
ProfileIdc: 66,
ChromaFormatIdc: 1,
ConstraintSet0Flag: true,
ConstraintSet1Flag: true,
LevelIdc: 40,
Expand All @@ -122,7 +123,7 @@ func TestSPSUnmarshal(t *testing.T) {
},
},
1920,
1084,
1080,
30,
},
{
Expand Down Expand Up @@ -368,6 +369,7 @@ func TestSPSUnmarshal(t *testing.T) {
},
SPS{
ProfileIdc: 77,
ChromaFormatIdc: 1,
LevelIdc: 41,
Log2MaxFrameNumMinus4: 5,
Log2MaxPicOrderCntLsbMinus4: 5,
Expand Down Expand Up @@ -420,7 +422,7 @@ func TestSPSUnmarshal(t *testing.T) {
},
},
1920,
1084,
1080,
25,
},
{
Expand All @@ -434,6 +436,7 @@ func TestSPSUnmarshal(t *testing.T) {
},
SPS{
ProfileIdc: 77,
ChromaFormatIdc: 1,
ConstraintSet1Flag: true,
LevelIdc: 40,
Log2MaxFrameNumMinus4: 1,
Expand Down Expand Up @@ -475,7 +478,7 @@ func TestSPSUnmarshal(t *testing.T) {
},
},
1920,
1084,
1080,
25,
},
} {
Expand Down
11 changes: 6 additions & 5 deletions pkg/formats/fmp4/init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ import (
"testing"

"github.com/aler9/writerseeker"
"github.com/bluenviron/mediacommon/pkg/codecs/mpeg4audio"
"github.com/stretchr/testify/require"

"github.com/bluenviron/mediacommon/pkg/codecs/mpeg4audio"
)

var testSPS = []byte{
Expand Down Expand Up @@ -391,7 +392,7 @@ var casesInit = []struct {
0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
0x07, 0x80, 0x00, 0x00, 0x04, 0x3c, 0x00, 0x00,
0x07, 0x80, 0x00, 0x00, 0x04, 0x38, 0x00, 0x00,
0x00, 0x00, 0x01, 0x88,
'm', 'd', 'i', 'a',
0x00, 0x00, 0x00, 0x20,
Expand Down Expand Up @@ -426,7 +427,7 @@ var casesInit = []struct {
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x80, 0x04,
0x3c, 0x00, 0x48, 0x00, 0x00, 0x00, 0x48, 0x00,
0x38, 0x00, 0x48, 0x00, 0x00, 0x00, 0x48, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
Expand Down Expand Up @@ -1321,7 +1322,7 @@ var casesInit = []struct {
0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
0x07, 0x80, 0x00, 0x00, 0x04, 0x3c, 0x00, 0x00,
0x07, 0x80, 0x00, 0x00, 0x04, 0x38, 0x00, 0x00,
0x00, 0x00, 0x01, 0x88,
'm', 'd', 'i', 'a',
0x00, 0x00, 0x00, 0x20,
Expand Down Expand Up @@ -1354,7 +1355,7 @@ var casesInit = []struct {
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x80, 0x04,
0x3c, 0x00, 0x48, 0x00, 0x00, 0x00, 0x48, 0x00,
0x38, 0x00, 0x48, 0x00, 0x00, 0x00, 0x48, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
Expand Down

0 comments on commit 9f2ad56

Please sign in to comment.