context: keep some room for our own support

We need some extra items in the array to store our own support
objects, so pass a smaller one to the core support.
This commit is contained in:
Wim Taymans 2021-03-25 17:43:59 +01:00
parent ee99693f77
commit bcc147cf72

View file

@ -281,7 +281,7 @@ struct pw_context *pw_context_new(struct pw_loop *main_loop,
this->data_system = this->data_loop->system; this->data_system = this->data_loop->system;
this->main_loop = main_loop; this->main_loop = main_loop;
n_support = pw_get_support(this->support, SPA_N_ELEMENTS(this->support)); n_support = pw_get_support(this->support, SPA_N_ELEMENTS(this->support) - 6);
this->support[n_support++] = SPA_SUPPORT_INIT(SPA_TYPE_INTERFACE_System, this->main_loop->system); this->support[n_support++] = SPA_SUPPORT_INIT(SPA_TYPE_INTERFACE_System, this->main_loop->system);
this->support[n_support++] = SPA_SUPPORT_INIT(SPA_TYPE_INTERFACE_Loop, this->main_loop->loop); this->support[n_support++] = SPA_SUPPORT_INIT(SPA_TYPE_INTERFACE_Loop, this->main_loop->loop);
this->support[n_support++] = SPA_SUPPORT_INIT(SPA_TYPE_INTERFACE_LoopUtils, this->main_loop->utils); this->support[n_support++] = SPA_SUPPORT_INIT(SPA_TYPE_INTERFACE_LoopUtils, this->main_loop->utils);