enable errcheck

This commit is contained in:
aler9
2023-08-13 15:21:13 +02:00
committed by Alessandro Ros
parent 08ab6c6ed2
commit 18ddae4c50
63 changed files with 344 additions and 203 deletions

View File

@@ -11,7 +11,8 @@ import (
)
const (
rtpVersion = 2
rtpVersion = 2
defaultPayloadMaxSize = 1460 // 1500 (UDP MTU) - 20 (IP header) - 8 (UDP header) - 12 (RTP header)
)
func randUint32() (uint32, error) {
@@ -81,7 +82,7 @@ func (e *Encoder) Init() error {
e.InitialTimestamp = &v
}
if e.PayloadMaxSize == 0 {
e.PayloadMaxSize = 1460 // 1500 (UDP MTU) - 20 (IP header) - 8 (UDP header) - 12 (RTP header)
e.PayloadMaxSize = defaultPayloadMaxSize
}
e.sequenceNumber = *e.InitialSequenceNumber