fix invalid TID=0 in writeAggregationUnit of rtph265 encoder (#782)

* fix invalid TID=0 in writeAggregationUnit of rtph265 encoder

* return error in case of invalid NALUs

---------

Co-authored-by: aler9 <46489434+aler9@users.noreply.github.com>
This commit is contained in:
Parallelc
2025-05-22 04:48:45 +08:00
committed by GitHub
parent bd07e2e04f
commit 2694ed941f
2 changed files with 25 additions and 9 deletions

View File

@@ -56,9 +56,9 @@ var cases = []struct {
{
"aggregated",
[][]byte{
{0x07, 0x07},
{0x08, 0x08},
{0x09, 0x09},
{0x07, 0x57},
{0x08, 0x66},
{0x09, 0x75},
},
[]*rtp.Packet{
{
@@ -70,8 +70,8 @@ var cases = []struct {
SSRC: 0x9dbb7812,
},
Payload: []byte{
0x60, 0x00, 0x00, 0x02, 0x07, 0x07, 0x00, 0x02,
0x08, 0x08, 0x00, 0x02, 0x09, 0x09,
0x60, 0x65, 0x00, 0x02, 0x07, 0x57, 0x00, 0x02,
0x08, 0x66, 0x00, 0x02, 0x09, 0x75,
},
},
},