mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
core: handle error when creating memorypool
Start data loop later.
This commit is contained in:
parent
638ee33f44
commit
74b4790afe
1 changed files with 7 additions and 3 deletions
|
|
@ -516,6 +516,10 @@ struct pw_core *pw_core_new(struct pw_loop *main_loop,
|
||||||
}
|
}
|
||||||
|
|
||||||
this->pool = pw_mempool_new(NULL);
|
this->pool = pw_mempool_new(NULL);
|
||||||
|
if (this->pool == NULL) {
|
||||||
|
res = -errno;
|
||||||
|
goto error_free_loop;
|
||||||
|
}
|
||||||
|
|
||||||
this->data_loop = pw_data_loop_get_loop(this->data_loop_impl);
|
this->data_loop = pw_data_loop_get_loop(this->data_loop_impl);
|
||||||
this->data_system = this->data_loop->system;
|
this->data_system = this->data_loop->system;
|
||||||
|
|
@ -548,9 +552,6 @@ struct pw_core *pw_core_new(struct pw_loop *main_loop,
|
||||||
}
|
}
|
||||||
this->n_support = n_support;
|
this->n_support = n_support;
|
||||||
|
|
||||||
if ((res = pw_data_loop_start(this->data_loop_impl)) < 0)
|
|
||||||
goto error_free_loop;
|
|
||||||
|
|
||||||
pw_array_init(&this->factory_lib, 32);
|
pw_array_init(&this->factory_lib, 32);
|
||||||
pw_map_init(&this->globals, 128, 32);
|
pw_map_init(&this->globals, 128, 32);
|
||||||
|
|
||||||
|
|
@ -577,6 +578,9 @@ struct pw_core *pw_core_new(struct pw_loop *main_loop,
|
||||||
name = pw_properties_get(properties, PW_KEY_CORE_NAME);
|
name = pw_properties_get(properties, PW_KEY_CORE_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((res = pw_data_loop_start(this->data_loop_impl)) < 0)
|
||||||
|
goto error_free_loop;
|
||||||
|
|
||||||
this->info.change_mask = 0;
|
this->info.change_mask = 0;
|
||||||
this->info.user_name = pw_get_user_name();
|
this->info.user_name = pw_get_user_name();
|
||||||
this->info.host_name = pw_get_host_name();
|
this->info.host_name = pw_get_host_name();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue