mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-05 13:30:02 -05:00
context: handle context errors
When the context is in error it might be unreffed. Make sure we don't ever unref the core from the callback because that is not allowed. Instead, add a defered to the mainloop to clean up later.
This commit is contained in:
parent
cb7b25277b
commit
49c99f8dee
3 changed files with 65 additions and 4 deletions
|
|
@ -257,6 +257,7 @@ struct global {
|
|||
|
||||
struct pa_context {
|
||||
int refcount;
|
||||
uint32_t client_index;
|
||||
|
||||
struct pw_loop *loop;
|
||||
struct pw_core *core;
|
||||
|
|
@ -284,13 +285,13 @@ struct pa_context {
|
|||
void *subscribe_userdata;
|
||||
pa_subscription_mask_t subscribe_mask;
|
||||
|
||||
bool no_fail;
|
||||
uint32_t client_index;
|
||||
|
||||
struct spa_list globals;
|
||||
|
||||
struct spa_list streams;
|
||||
struct spa_list operations;
|
||||
|
||||
int no_fail:1;
|
||||
int disconnect:1;
|
||||
};
|
||||
|
||||
struct global *pa_context_find_global(pa_context *c, uint32_t id);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue