mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	node: revert previous commit
Always add work to the work queue, some code relies on the fact that the state change continuation happens from next iteration of the mainloop. Don't warn when destroying the work queue and there are still items in it, this is ok.
This commit is contained in:
		
							parent
							
								
									80ba0b2dcf
								
							
						
					
					
						commit
						7fd6d6d820
					
				
					 2 changed files with 3 additions and 5 deletions
				
			
		| 
						 | 
				
			
			@ -1774,11 +1774,9 @@ int pw_node_set_state(struct pw_node *node, enum pw_node_state state)
 | 
			
		|||
 | 
			
		||||
	if (SPA_RESULT_IS_ASYNC(res)) {
 | 
			
		||||
		res = spa_node_sync(node->node, res);
 | 
			
		||||
	}
 | 
			
		||||
	pw_work_queue_add(impl->work,
 | 
			
		||||
			node, res, on_state_complete, SPA_INT_TO_PTR(state));
 | 
			
		||||
	} else {
 | 
			
		||||
		on_state_complete(node, SPA_INT_TO_PTR(state), res, 0);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return res;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -139,7 +139,7 @@ void pw_work_queue_destroy(struct pw_work_queue *queue)
 | 
			
		|||
	pw_loop_destroy_source(queue->loop, queue->wakeup);
 | 
			
		||||
 | 
			
		||||
	spa_list_for_each_safe(item, tmp, &queue->work_list, link) {
 | 
			
		||||
		pw_log_warn(NAME" %p: cancel work item %p %d %d", queue,
 | 
			
		||||
		pw_log_debug(NAME" %p: cancel work item %p %d %d", queue,
 | 
			
		||||
			    item->obj, item->seq, item->res);
 | 
			
		||||
		free(item);
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue