mirror of
https://github.com/aler9/gortsplib
synced 2025-10-05 23:26:54 +08:00
improve coverage
This commit is contained in:
@@ -267,6 +267,15 @@ func TestDecodeErrors(t *testing.T) {
|
||||
pkts [][]byte
|
||||
err string
|
||||
}{
|
||||
{
|
||||
"invalid rtp",
|
||||
[][]byte{
|
||||
{
|
||||
0xaa,
|
||||
},
|
||||
},
|
||||
"RTP header size insufficient: 1 < 4",
|
||||
},
|
||||
{
|
||||
"missing payload",
|
||||
[][]byte{
|
||||
|
@@ -287,6 +287,15 @@ func TestDecodeErrors(t *testing.T) {
|
||||
pkts [][]byte
|
||||
err string
|
||||
}{
|
||||
{
|
||||
"invalid rtp",
|
||||
[][]byte{
|
||||
{
|
||||
0xaa,
|
||||
},
|
||||
},
|
||||
"RTP header size insufficient: 1 < 4",
|
||||
},
|
||||
{
|
||||
"missing payload",
|
||||
[][]byte{{
|
||||
@@ -409,7 +418,7 @@ func TestReadSPSPPS(t *testing.T) {
|
||||
pps []byte
|
||||
}{
|
||||
{
|
||||
"standard",
|
||||
"sps then pps",
|
||||
[][]byte{
|
||||
{128, 96, 61, 205, 54, 67, 90, 125, 40, 249, 97, 176, 7, 1, 2},
|
||||
{128, 96, 61, 206, 54, 67, 90, 125, 40, 249, 97, 176, 8, 3, 4},
|
||||
@@ -417,6 +426,15 @@ func TestReadSPSPPS(t *testing.T) {
|
||||
[]byte{0x07, 0x01, 0x02},
|
||||
[]byte{0x08, 0x03, 0x04},
|
||||
},
|
||||
{
|
||||
"pps then sps",
|
||||
[][]byte{
|
||||
{128, 96, 61, 206, 54, 67, 90, 125, 40, 249, 97, 176, 8, 3, 4},
|
||||
{128, 96, 61, 205, 54, 67, 90, 125, 40, 249, 97, 176, 7, 1, 2},
|
||||
},
|
||||
[]byte{0x07, 0x01, 0x02},
|
||||
[]byte{0x08, 0x03, 0x04},
|
||||
},
|
||||
} {
|
||||
t.Run(ca.name, func(t *testing.T) {
|
||||
i := 0
|
||||
|
Reference in New Issue
Block a user