mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
spa: support: loop: initialize rmask
Set `rmask` to zero when a source is added to, or removed from the loop.
This commit is contained in:
parent
e2287f35db
commit
a22ce76dbf
1 changed files with 2 additions and 0 deletions
|
|
@ -118,6 +118,7 @@ static int loop_add_source(void *object, struct spa_source *source)
|
|||
struct impl *impl = object;
|
||||
source->loop = &impl->loop;
|
||||
source->priv = NULL;
|
||||
source->rmask = 0;
|
||||
return spa_system_pollfd_add(impl->system, impl->poll_fd, source->fd, source->mask, source);
|
||||
}
|
||||
|
||||
|
|
@ -137,6 +138,7 @@ static int loop_remove_source(void *object, struct spa_source *source)
|
|||
source->priv = NULL;
|
||||
}
|
||||
source->loop = NULL;
|
||||
source->rmask = 0;
|
||||
return spa_system_pollfd_del(impl->system, impl->poll_fd, source->fd);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue