mirror of
				https://github.com/aler9/rtsp-simple-server
				synced 2025-11-01 03:22:50 +08:00 
			
		
		
		
	add option to set max size of outgoing UDP packets (#1588) (#1601)
	
		
			
	
		
	
	
		
	
		
			Some checks failed
		
		
	
	
		
			
				
	
				apidocs 
				
					
					
				
			
		
			
				
	
				code 
				
					
					
				
			
		
			
				
	
				mod-tidy 
				
					
					
				
			
		
			
				
	
				test32 
				
					
					
				
			
		
			
				
	
				test64 
				
					
					
				
			
		
			
				
	
				test_highlevel 
				
					
					
				
			
		
		
	
	
				
					
				
			
		
			Some checks failed
		
		
	
	apidocs 
				code 
				mod-tidy 
				test32 
				test64 
				test_highlevel 
				This commit is contained in:
		| @@ -21,6 +21,7 @@ import ( | ||||
|  | ||||
| const ( | ||||
| 	multicastTTL = 16 | ||||
| 	udpMTU       = 1472 | ||||
| ) | ||||
|  | ||||
| var opusDurations = [32]int{ | ||||
| @@ -127,7 +128,7 @@ func (s *udpSource) run(ctx context.Context, cnf *conf.PathConf, reloadConf chan | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	midbuffer := make([]byte, 0, 1472) // UDP MTU | ||||
| 	midbuffer := make([]byte, 0, udpMTU) | ||||
| 	midbufferPos := 0 | ||||
|  | ||||
| 	readPacket := func(buf []byte) (int, error) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Alessandro Ros
					Alessandro Ros