mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	bluetooth: Do not setup stream before thread starts
bt_transport_acquire() might get called from the main thread, in case the IO thread hasn't been started yet. In this case, we should not call setup_stream() since this is going to be called in the beginning of thread_func().
This commit is contained in:
		
							parent
							
								
									1dcdb96ee5
								
							
						
					
					
						commit
						01435e6134
					
				
					 1 changed files with 4 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -426,6 +426,10 @@ static int bt_transport_acquire(struct userdata *u, pa_bool_t start) {
 | 
			
		|||
        return 0;
 | 
			
		||||
 | 
			
		||||
done:
 | 
			
		||||
    /* If thread is still about to start, the stream will be set up in the beginning of thread_func() */
 | 
			
		||||
    if (u->thread == NULL)
 | 
			
		||||
        return 0;
 | 
			
		||||
 | 
			
		||||
    setup_stream(u);
 | 
			
		||||
 | 
			
		||||
    return 0;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue