mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
loop: clean polling flag when leaving the loop
When we leave the last recursive enter of the loop, clear the polling flag. It might be possible that it was not cleared because the loop might have been killed with pthread_kill. In any case, the _leave calls need to be made in this case as well. This fixes issues when jack clients stop because it triggers and assert because the polling flag is still active when the object is cleared. See !1171
This commit is contained in:
parent
dcbaed1251
commit
54933b67fd
1 changed files with 3 additions and 1 deletions
|
|
@ -348,8 +348,10 @@ static void loop_leave(void *object)
|
|||
|
||||
spa_log_trace(impl->log, "%p: leave %lu", impl, impl->thread);
|
||||
|
||||
if (--impl->enter_count == 0)
|
||||
if (--impl->enter_count == 0) {
|
||||
impl->thread = 0;
|
||||
impl->polling = false;
|
||||
}
|
||||
}
|
||||
|
||||
static inline void free_source(struct source_impl *s)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue