mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	sink,source: Avoid crash by not updating volume on shutdown
Sometimes the ALSA mixer can be modified during a point at shutdown which causes a race condition trying to update the volume of an unlinked sink. Includes typo fix by our Chief Typo Spotter, Colin, and a clarifying comment by me. BugLink: http://bugs.launchpad.net/bugs/841968 Signed-off-by: David Henningsson <david.henningsson@canonical.com>
This commit is contained in:
		
							parent
							
								
									38be4a2d44
								
							
						
					
					
						commit
						f8624a7876
					
				
					 4 changed files with 14 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -2623,6 +2623,10 @@ int pa_sink_process_msg(pa_msgobject *o, int code, void *userdata, int64_t offse
 | 
			
		|||
            /* This message is sent from IO-thread and handled in main thread. */
 | 
			
		||||
            pa_assert_ctl_context();
 | 
			
		||||
 | 
			
		||||
            /* Make sure we're not messing with main thread when no longer linked */
 | 
			
		||||
            if (!PA_SINK_IS_LINKED(s->state))
 | 
			
		||||
                return 0;
 | 
			
		||||
 | 
			
		||||
            pa_sink_get_volume(s, TRUE);
 | 
			
		||||
            pa_sink_get_mute(s, TRUE);
 | 
			
		||||
            return 0;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue