mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	thread-mq: never drop queued messages for the main loop
Previously we might have dropped messages from IO trheads to the main thread. This tuend out to be problematic since this cause SHM release messages to be lost. More visibly however this could cause playback freezing when moving streams between sinks and removing the old sink right away.
This commit is contained in:
		
							parent
							
								
									446fb2c9fe
								
							
						
					
					
						commit
						9e21182e01
					
				
					 1 changed files with 7 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -104,6 +104,13 @@ void pa_thread_mq_init(pa_thread_mq *q, pa_mainloop_api *mainloop, pa_rtpoll *rt
 | 
			
		|||
void pa_thread_mq_done(pa_thread_mq *q) {
 | 
			
		||||
    pa_assert(q);
 | 
			
		||||
 | 
			
		||||
    /* Since we are called from main context we can be sure that the
 | 
			
		||||
     * inq is empty. However, the outq might still contain messages
 | 
			
		||||
     * for the main loop, which we need to dispatch (e.g. release
 | 
			
		||||
     * msgs, other stuff). Hence do so. */
 | 
			
		||||
 | 
			
		||||
    pa_asyncmsgq_flush(q->outq, TRUE);
 | 
			
		||||
 | 
			
		||||
    q->mainloop->io_free(q->read_event);
 | 
			
		||||
    q->mainloop->io_free(q->write_event);
 | 
			
		||||
    q->read_event = q->write_event = NULL;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue