mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-21 07:00:08 -05:00
data-loop: check running state in _in_thread()
We can only be in the thread when the thread is running.
This commit is contained in:
parent
7e42c905a8
commit
9849d12009
1 changed files with 1 additions and 1 deletions
|
|
@ -246,7 +246,7 @@ int pw_data_loop_stop(struct pw_data_loop *loop)
|
||||||
SPA_EXPORT
|
SPA_EXPORT
|
||||||
bool pw_data_loop_in_thread(struct pw_data_loop * loop)
|
bool pw_data_loop_in_thread(struct pw_data_loop * loop)
|
||||||
{
|
{
|
||||||
return pthread_equal(loop->thread, pthread_self());
|
return loop->running && pthread_equal(loop->thread, pthread_self());
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Get the thread object.
|
/** Get the thread object.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue