mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	module-loopback: Never call adjust_rates after teardown
Calling adjust_rates after teardown results in segfault, and judging from the Ubuntu bug report, this can happen. Actively prevent this by destroying the time event, and by setting adjust_time to 0, we also prevent this routine being called on max request update. BugLink: https://bugs.launchpad.net/bugs/946400 Signed-off-by: David Henningsson <david.henningsson@canonical.com>
This commit is contained in:
		
							parent
							
								
									13d388b4ce
								
							
						
					
					
						commit
						00c3a4958e
					
				
					 1 changed files with 7 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -137,6 +137,13 @@ static void teardown(struct userdata *u) {
 | 
			
		|||
    pa_assert_ctl_context();
 | 
			
		||||
 | 
			
		||||
    pa_asyncmsgq_flush(u->asyncmsgq, 0);
 | 
			
		||||
 | 
			
		||||
    u->adjust_time = 0;
 | 
			
		||||
    if (u->time_event) {
 | 
			
		||||
        u->core->mainloop->time_free(u->time_event);
 | 
			
		||||
        u->time_event = NULL;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (u->sink_input)
 | 
			
		||||
        pa_sink_input_unlink(u->sink_input);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -860,8 +867,5 @@ void pa__done(pa_module*m) {
 | 
			
		|||
    if (u->asyncmsgq)
 | 
			
		||||
        pa_asyncmsgq_unref(u->asyncmsgq);
 | 
			
		||||
 | 
			
		||||
    if (u->time_event)
 | 
			
		||||
        u->core->mainloop->time_free(u->time_event);
 | 
			
		||||
 | 
			
		||||
    pa_xfree(u);
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue