mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	loop: invoke immediately when loop is not running
Or else we might never get our callback called or worse, block forever, waiting for the response.
This commit is contained in:
		
							parent
							
								
									18607ee5e3
								
							
						
					
					
						commit
						6ece5d810c
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -187,7 +187,7 @@ loop_invoke(void *object,
 | 
				
			||||||
	int32_t filled;
 | 
						int32_t filled;
 | 
				
			||||||
	uint32_t avail, idx, offset, l0;
 | 
						uint32_t avail, idx, offset, l0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (pthread_equal(impl->thread, pthread_self()))
 | 
						if (impl->thread == 0 || pthread_equal(impl->thread, pthread_self()))
 | 
				
			||||||
		return loop_invoke_inthread(impl, func, seq, data, size, block, user_data);
 | 
							return loop_invoke_inthread(impl, func, seq, data, size, block, user_data);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	filled = spa_ringbuffer_get_write_index(&impl->buffer, &idx);
 | 
						filled = spa_ringbuffer_get_write_index(&impl->buffer, &idx);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue