mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	module: remove resource listener in cleanup
Remove the resource listener before destroying the object because that will trigger the resource cleanup again.
This commit is contained in:
		
							parent
							
								
									8a88c6da53
								
							
						
					
					
						commit
						8a562c4427
					
				
					 2 changed files with 2 additions and 0 deletions
				
			
		| 
						 | 
					@ -64,6 +64,7 @@ struct node_data {
 | 
				
			||||||
static void resource_destroy(void *data)
 | 
					static void resource_destroy(void *data)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct node_data *nd = data;
 | 
						struct node_data *nd = data;
 | 
				
			||||||
 | 
						spa_hook_remove(&nd->resource_listener);
 | 
				
			||||||
	if (nd->dsp)
 | 
						if (nd->dsp)
 | 
				
			||||||
		pw_node_destroy(nd->dsp);
 | 
							pw_node_destroy(nd->dsp);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -57,6 +57,7 @@ struct link_data {
 | 
				
			||||||
static void resource_destroy(void *data)
 | 
					static void resource_destroy(void *data)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct link_data *ld = data;
 | 
						struct link_data *ld = data;
 | 
				
			||||||
 | 
						spa_hook_remove(&ld->resource_listener);
 | 
				
			||||||
	if (ld->link)
 | 
						if (ld->link)
 | 
				
			||||||
		pw_link_destroy(ld->link);
 | 
							pw_link_destroy(ld->link);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue