mirror of
https://github.com/aler9/gortsplib
synced 2025-10-06 23:52:46 +08:00
rtph264: add error in case of a fragmented NALU with two starting packets
This commit is contained in:
@@ -416,6 +416,28 @@ func TestDecodeErrors(t *testing.T) {
|
||||
},
|
||||
"expected FU-A packet, got another type",
|
||||
},
|
||||
{
|
||||
"FU-A with two starting packets",
|
||||
[][]byte{
|
||||
mergeBytes(
|
||||
[]byte{
|
||||
0x80, 0x60, 0x44, 0xed, 0x88, 0x77, 0x79, 0xab,
|
||||
0x9d, 0xbb, 0x78, 0x12, 0x1c, 0x85,
|
||||
},
|
||||
bytes.Repeat([]byte{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07}, 182),
|
||||
[]byte{0x00, 0x01},
|
||||
),
|
||||
mergeBytes(
|
||||
[]byte{
|
||||
0x80, 0x60, 0x44, 0xed, 0x88, 0x77, 0x79, 0xab,
|
||||
0x9d, 0xbb, 0x78, 0x12, 0x1c, 0x85,
|
||||
},
|
||||
bytes.Repeat([]byte{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07}, 182),
|
||||
[]byte{0x00, 0x01},
|
||||
),
|
||||
},
|
||||
"invalid FU-A packet (decoded two starting packets in a row)",
|
||||
},
|
||||
{
|
||||
"MTAP",
|
||||
[][]byte{{
|
||||
|
Reference in New Issue
Block a user