mirror of
				https://github.com/alsa-project/alsa-lib.git
				synced 2025-11-03 09:01:52 -05:00 
			
		
		
		
	output error message instead of assert().
assert() may cause an infinite loop in aplay, since it's in the closing phase.
This commit is contained in:
		
							parent
							
								
									b4b00dd7cf
								
							
						
					
					
						commit
						5191bbcce5
					
				
					 1 changed files with 4 additions and 1 deletions
				
			
		| 
						 | 
					@ -65,7 +65,10 @@ static int snd_pcm_plug_close(snd_pcm_t *pcm)
 | 
				
			||||||
	int err, result = 0;
 | 
						int err, result = 0;
 | 
				
			||||||
	if (plug->ttable)
 | 
						if (plug->ttable)
 | 
				
			||||||
		free(plug->ttable);
 | 
							free(plug->ttable);
 | 
				
			||||||
	assert(plug->slave == plug->req_slave);
 | 
						if (plug->slave != plug->req_slave) {
 | 
				
			||||||
 | 
							SNDERR("plug slaves mismatch");
 | 
				
			||||||
 | 
							return -EINVAL;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
	if (plug->close_slave) {
 | 
						if (plug->close_slave) {
 | 
				
			||||||
		err = snd_pcm_close(plug->req_slave);
 | 
							err = snd_pcm_close(plug->req_slave);
 | 
				
			||||||
		if (err < 0)
 | 
							if (err < 0)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue