mirror of
https://github.com/aler9/gortsplib
synced 2025-10-05 07:06:58 +08:00
rtp*: support decoding negative timestamps
This commit is contained in:
@@ -55,6 +55,25 @@ var cases = []struct {
|
||||
),
|
||||
},
|
||||
},
|
||||
{
|
||||
"negative timestamp",
|
||||
&NALUAndTimestamp{
|
||||
Timestamp: -20 * time.Millisecond,
|
||||
NALU: mergeBytes(
|
||||
[]byte{0x05},
|
||||
bytes.Repeat([]byte{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07}, 8),
|
||||
),
|
||||
},
|
||||
[][]byte{
|
||||
mergeBytes(
|
||||
[]byte{
|
||||
0x80, 0xe0, 0x44, 0xed, 0x88, 0x77, 0x5f, 0x4d,
|
||||
0x9d, 0xbb, 0x78, 0x12, 0x05,
|
||||
},
|
||||
bytes.Repeat([]byte{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07}, 8),
|
||||
),
|
||||
},
|
||||
},
|
||||
{
|
||||
"fragmented",
|
||||
&NALUAndTimestamp{
|
||||
|
Reference in New Issue
Block a user