mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
thread-loop: only restore recurse on error
Only restore the previous recurse state when we fail to unlock.
This commit is contained in:
parent
aa2ea737c7
commit
edbfd180d0
1 changed files with 2 additions and 2 deletions
|
|
@ -60,10 +60,10 @@ static int do_unlock(struct pw_thread_loop *this)
|
|||
int res;
|
||||
spa_return_val_if_fail(this->recurse > 0, -EIO);
|
||||
this->recurse--;
|
||||
if ((res = pthread_mutex_unlock(&this->lock)) != 0)
|
||||
if ((res = pthread_mutex_unlock(&this->lock)) != 0) {
|
||||
pw_log_error("%p: thread:%lu: %s", this, pthread_self(), strerror(res));
|
||||
else
|
||||
this->recurse++;
|
||||
}
|
||||
return -res;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue