mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	clean up listeners
This commit is contained in:
		
							parent
							
								
									69d4144932
								
							
						
					
					
						commit
						6450c64542
					
				
					 3 changed files with 3 additions and 0 deletions
				
			
		| 
						 | 
					@ -1136,6 +1136,7 @@ static void client_node_resource_destroy(void *data)
 | 
				
			||||||
	pw_log_debug("client-node %p: destroy", impl);
 | 
						pw_log_debug("client-node %p: destroy", impl);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	impl->node.resource = this->resource = NULL;
 | 
						impl->node.resource = this->resource = NULL;
 | 
				
			||||||
 | 
						spa_hook_remove(&impl->resource_listener);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (node->data_source.fd != -1) {
 | 
						if (node->data_source.fd != -1) {
 | 
				
			||||||
		spa_loop_invoke(node->data_loop,
 | 
							spa_loop_invoke(node->data_loop,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -52,6 +52,7 @@ static void node_destroy(void *data)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct node_data *nd = data;
 | 
						struct node_data *nd = data;
 | 
				
			||||||
	spa_list_remove(&nd->link);
 | 
						spa_list_remove(&nd->link);
 | 
				
			||||||
 | 
						spa_hook_remove(&nd->node_listener);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static const struct pw_node_events node_events = {
 | 
					static const struct pw_node_events node_events = {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -62,6 +62,7 @@ static void pw_spa_node_destroy(void *data)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pw_log_debug("spa-node %p: destroy", node);
 | 
						pw_log_debug("spa-node %p: destroy", node);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						spa_hook_remove(&impl->node_listener);
 | 
				
			||||||
	if (impl->handle) {
 | 
						if (impl->handle) {
 | 
				
			||||||
		spa_handle_clear(impl->handle);
 | 
							spa_handle_clear(impl->handle);
 | 
				
			||||||
		free(impl->handle);
 | 
							free(impl->handle);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue