mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	pulse-server: recover for underrun better
If we are underrun, don't update the read pointer and let the write pointer catch up. If we don't have enough data to fill a buffer, skip all the available data and wait for the new request to arrive. Fixes #1857
This commit is contained in:
		
							parent
							
								
									3df6e77996
								
							
						
					
					
						commit
						700a22b7f7
					
				
					 1 changed files with 4 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -1243,8 +1243,10 @@ static void stream_process(void *data)
 | 
			
		|||
			if (stream->attr.prebuf == 0 && !stream->corked) {
 | 
			
		||||
				pd.missing = size;
 | 
			
		||||
				pd.playing_for = size;
 | 
			
		||||
				index += size;
 | 
			
		||||
				pd.read_inc = size;
 | 
			
		||||
				if (avail > 0) {
 | 
			
		||||
					index += avail;
 | 
			
		||||
					pd.read_inc = avail;
 | 
			
		||||
				}
 | 
			
		||||
				spa_ringbuffer_read_update(&stream->ring, index);
 | 
			
		||||
			}
 | 
			
		||||
		} else {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue