mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
impl-port: init some stuff earlier
Initialize the mix_hooks, port_map and latency earlier, before we call pw_impl_port_set_mix() and update_info, that could potentially expect this to be initialized.
This commit is contained in:
parent
c296c52cae
commit
1717ff336e
1 changed files with 6 additions and 6 deletions
|
|
@ -800,6 +800,12 @@ struct pw_impl_port *pw_context_create_port(
|
|||
spa_list_init(&this->control_list[1]);
|
||||
|
||||
spa_hook_list_init(&this->listener_list);
|
||||
spa_hook_list_init(&impl->mix_hooks);
|
||||
|
||||
pw_map_init(&this->mix_port_map, 64, 64);
|
||||
|
||||
this->latency[SPA_DIRECTION_INPUT] = SPA_LATENCY_INFO(SPA_DIRECTION_INPUT);
|
||||
this->latency[SPA_DIRECTION_OUTPUT] = SPA_LATENCY_INFO(SPA_DIRECTION_OUTPUT);
|
||||
|
||||
if (this->direction == PW_DIRECTION_INPUT)
|
||||
mix_methods = &schedule_mix_node;
|
||||
|
|
@ -810,15 +816,9 @@ struct pw_impl_port *pw_context_create_port(
|
|||
SPA_TYPE_INTERFACE_Node,
|
||||
SPA_VERSION_NODE,
|
||||
mix_methods, impl);
|
||||
spa_hook_list_init(&impl->mix_hooks);
|
||||
|
||||
pw_impl_port_set_mix(this, NULL, 0);
|
||||
|
||||
pw_map_init(&this->mix_port_map, 64, 64);
|
||||
|
||||
this->latency[SPA_DIRECTION_INPUT] = SPA_LATENCY_INFO(SPA_DIRECTION_INPUT);
|
||||
this->latency[SPA_DIRECTION_OUTPUT] = SPA_LATENCY_INFO(SPA_DIRECTION_OUTPUT);
|
||||
|
||||
if (info)
|
||||
update_info(this, info);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue