mirror of
https://github.com/aler9/gortsplib
synced 2025-10-25 00:00:30 +08:00
set default max payload size to 1450 (#811)
this is to support SRTP more easily.
This commit is contained in:
@@ -12,7 +12,7 @@ import (
|
||||
|
||||
const (
|
||||
rtpVersion = 2
|
||||
defaultPayloadMaxSize = 1460 // 1500 (UDP MTU) - 20 (IP header) - 8 (UDP header) - 12 (RTP header)
|
||||
defaultPayloadMaxSize = 1450 // 1500 (UDP MTU) - 20 (IP header) - 8 (UDP header) - 12 (RTP header) - 10 (SRTP overhead)
|
||||
)
|
||||
|
||||
func randUint32() (uint32, error) {
|
||||
@@ -36,7 +36,7 @@ type Encoder struct {
|
||||
InitialSequenceNumber *uint16
|
||||
|
||||
// maximum size of packet payloads (optional).
|
||||
// It defaults to 1460.
|
||||
// It defaults to 1450.
|
||||
PayloadMaxSize int
|
||||
|
||||
sequenceNumber uint16
|
||||
|
||||
Reference in New Issue
Block a user