mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	pulse: avoid emiting the NEW event too soon
Let the NEW event be emited when all params are updated.
This commit is contained in:
		
							parent
							
								
									4346cad322
								
							
						
					
					
						commit
						f51ba55dae
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		| 
						 | 
					@ -420,8 +420,10 @@ static void parse_props(struct global *g, const struct spa_pod *param)
 | 
				
			||||||
				pw_log_debug("channel change %d->%d, trigger remove",
 | 
									pw_log_debug("channel change %d->%d, trigger remove",
 | 
				
			||||||
						g->node_info.n_channel_volumes, n_vals);
 | 
											g->node_info.n_channel_volumes, n_vals);
 | 
				
			||||||
				emit_event(g->context, g, PA_SUBSCRIPTION_EVENT_REMOVE);
 | 
									emit_event(g->context, g, PA_SUBSCRIPTION_EVENT_REMOVE);
 | 
				
			||||||
				emit_event(g->context, g, PA_SUBSCRIPTION_EVENT_NEW);
 | 
					 | 
				
			||||||
				g->node_info.n_channel_volumes = n_vals;
 | 
									g->node_info.n_channel_volumes = n_vals;
 | 
				
			||||||
 | 
									/* mark as init, this will emit the NEW event when the
 | 
				
			||||||
 | 
									 * params are updated */
 | 
				
			||||||
 | 
									g->init = true;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			break;
 | 
								break;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue