mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	module-jack: don't crash when NULL source/sink
It is possible that we destroyed the source/sink when we get a latency update from jack, don't try to update the source/sink in that case or we will crash.
This commit is contained in:
		
							parent
							
								
									caeaaf9c24
								
							
						
					
					
						commit
						e24d7cc8b7
					
				
					 1 changed files with 4 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -526,6 +526,7 @@ do_update_latency(struct spa_loop *loop,
 | 
			
		|||
					SPA_PARAM_Latency, &impl->sink_latency[SPA_DIRECTION_INPUT]);
 | 
			
		||||
			impl->sink_latency_changed[SPA_DIRECTION_INPUT] = false;
 | 
			
		||||
		}
 | 
			
		||||
		if (impl->sink)
 | 
			
		||||
			pw_stream_update_params(impl->sink, params, n_params);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -536,6 +537,7 @@ do_update_latency(struct spa_loop *loop,
 | 
			
		|||
					SPA_PARAM_Latency, &impl->source_latency[SPA_DIRECTION_OUTPUT]);
 | 
			
		||||
			impl->source_latency_changed[SPA_DIRECTION_OUTPUT] = false;
 | 
			
		||||
		}
 | 
			
		||||
		if (impl->source)
 | 
			
		||||
			pw_stream_update_params(impl->source, params, n_params);
 | 
			
		||||
	}
 | 
			
		||||
	return 0;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue