mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	module-rtp: Clamp buffer fill level check on send side
This is based on target_buffer which is likely to be much smaller than BUFFER_SIZE (currently 4MB). This is already done on the receive side.
This commit is contained in:
		
							parent
							
								
									9f643fec7e
								
							
						
					
					
						commit
						48c2e95165
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -361,7 +361,7 @@ static void rtp_audio_process_capture(void *data)
 | 
			
		|||
		if (SPA_ABS((int)expected_timestamp - (int)timestamp) > (int)quantum) {
 | 
			
		||||
			pw_log_warn("expected %u != timestamp %u", expected_timestamp, timestamp);
 | 
			
		||||
			impl->have_sync = false;
 | 
			
		||||
		} else if (filled + wanted > (int32_t)(BUFFER_SIZE / stride)) {
 | 
			
		||||
		} else if (filled + wanted > (int32_t)SPA_MIN(impl->target_buffer * 8, BUFFER_SIZE / stride)) {
 | 
			
		||||
			pw_log_warn("overrun %u + %u > %u", filled, wanted, BUFFER_SIZE / stride);
 | 
			
		||||
			impl->have_sync = false;
 | 
			
		||||
			filled = 0;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue