From f51ba55dae45b03422a3e5ee9e046177bc257eae Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 2 Apr 2020 15:30:15 +0200 Subject: [PATCH] pulse: avoid emiting the NEW event too soon Let the NEW event be emited when all params are updated. --- pipewire-pulseaudio/src/context.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pipewire-pulseaudio/src/context.c b/pipewire-pulseaudio/src/context.c index 475c52f58..32848306f 100644 --- a/pipewire-pulseaudio/src/context.c +++ b/pipewire-pulseaudio/src/context.c @@ -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", 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_NEW); 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; }