mirror of
				https://github.com/aler9/gortsplib
				synced 2025-10-31 18:42:40 +08:00 
			
		
		
		
	set default max payload size to 1450 (#811)
this is to support SRTP more easily.
This commit is contained in:
		| @@ -10,7 +10,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) { | ||||
| @@ -37,7 +37,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
	 Alessandro Ros
					Alessandro Ros