add an upper limit on AU/NALU sizes in order to prevent RAM exhaustion

This commit is contained in:
aler9
2022-04-10 15:30:05 +02:00
parent 3e852707c7
commit d479e9ee7d
6 changed files with 31 additions and 13 deletions

View File

@@ -8,11 +8,6 @@ import (
"github.com/pion/rtp"
)
const (
rtpVersion = 0x02
rtpClockRate = 90000 // h264 always uses 90khz
)
func randUint32() uint32 {
var b [4]byte
rand.Read(b[:])