stream: delay emit param changes when inside emit_param_changed

When we are notifying the application of changed params, don't emit any
changes applied to the params from within the callback with
pw_stream_update_params(). This will be done after we complete the
callback.

This also avoids reseting the change counter so that we don't
accidentally think we updated the formats param when we simply changed
some other params.
This commit is contained in:
Wim Taymans 2024-01-16 16:41:15 +01:00
parent b63230f805
commit 0a11281834

View file

@ -2199,9 +2199,10 @@ int pw_stream_update_params(struct pw_stream *stream,
if ((res = update_params(impl, SPA_ID_INVALID, params, n_params)) < 0)
return res;
emit_node_info(impl, false);
emit_port_info(impl, false);
if (impl->in_emit_param_changed == 0) {
emit_node_info(impl, false);
emit_port_info(impl, false);
}
return res;
}