mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	loopback: Fix cork state not updated after move
The source output and sink inputs should be corked if the corresponding sink/source is suspended, as handled during module initialization. This also needs to be handled during stream move, because the suspend state of the destination sink/source might be different to the previous one. This fixes the issue with an infinite number of "Requesting rewind due to end of underrun" traces after a stream move.
This commit is contained in:
		
							parent
							
								
									736e041980
								
							
						
					
					
						commit
						8c81f4d0bd
					
				
					 1 changed files with 14 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -419,6 +419,13 @@ static void source_output_moving_cb(pa_source_output *o, pa_source *dest) {
 | 
			
		|||
 | 
			
		||||
    pa_sink_input_update_proplist(u->sink_input, PA_UPDATE_REPLACE, p);
 | 
			
		||||
    pa_proplist_free(p);
 | 
			
		||||
 | 
			
		||||
    if (pa_source_get_state(dest) == PA_SOURCE_SUSPENDED)
 | 
			
		||||
        pa_sink_input_cork(u->sink_input, true);
 | 
			
		||||
    else
 | 
			
		||||
        pa_sink_input_cork(u->sink_input, false);
 | 
			
		||||
 | 
			
		||||
    update_adjust_timer(u);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Called from main thread */
 | 
			
		||||
| 
						 | 
				
			
			@ -684,6 +691,13 @@ static void sink_input_moving_cb(pa_sink_input *i, pa_sink *dest) {
 | 
			
		|||
 | 
			
		||||
    pa_source_output_update_proplist(u->source_output, PA_UPDATE_REPLACE, p);
 | 
			
		||||
    pa_proplist_free(p);
 | 
			
		||||
 | 
			
		||||
    if (pa_sink_get_state(dest) == PA_SINK_SUSPENDED)
 | 
			
		||||
        pa_source_output_cork(u->source_output, true);
 | 
			
		||||
    else
 | 
			
		||||
        pa_source_output_cork(u->source_output, false);
 | 
			
		||||
 | 
			
		||||
    update_adjust_timer(u);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Called from main thread */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue