mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
spa: support: loop: assert loop is not polling when source is removed
`spa_source`s whose backing storage is not managed by the loop cannot be safely removed while the loop is polling. Assert that it does not happen.
This commit is contained in:
parent
60b9d9081b
commit
616519d704
1 changed files with 4 additions and 1 deletions
|
|
@ -155,7 +155,10 @@ static int remove_from_poll(struct impl *impl, struct spa_source *source)
|
||||||
|
|
||||||
static int loop_remove_source(void *object, struct spa_source *source)
|
static int loop_remove_source(void *object, struct spa_source *source)
|
||||||
{
|
{
|
||||||
int res = remove_from_poll(object, source);
|
struct impl *impl = object;
|
||||||
|
spa_assert(!impl->polling);
|
||||||
|
|
||||||
|
int res = remove_from_poll(impl, source);
|
||||||
detach_source(source);
|
detach_source(source);
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue