context: cancel operations when globals are removed

Keep track of all the operations pending for a global and cancel them
when the global is removed.
This commit is contained in:
Wim Taymans 2019-03-12 12:15:28 +01:00
parent 3eb1a09cd2
commit cb7b25277b
4 changed files with 33 additions and 15 deletions

View file

@ -217,7 +217,8 @@ struct global {
pa_subscription_mask_t mask;
pa_subscription_event_type_t event;
pa_operation *operation;
struct spa_list operations;
void *info;
pw_destroy_t destroy;
@ -390,6 +391,9 @@ struct pa_operation
pa_context *context;
pa_stream *stream;
struct spa_list owner_link;
struct global *owner;
int seq;
pa_operation_state_t state;