mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
data-loop: call pw_loop_invoke directly
The loop invoke method will already call the function directly when the thread has been stopped and will also make sure that pending items are flushed first. See #2631
This commit is contained in:
parent
9d5f565682
commit
32cf5f312b
1 changed files with 1 additions and 6 deletions
|
|
@ -274,12 +274,7 @@ int pw_data_loop_invoke(struct pw_data_loop *loop,
|
||||||
spa_invoke_func_t func, uint32_t seq, const void *data, size_t size,
|
spa_invoke_func_t func, uint32_t seq, const void *data, size_t size,
|
||||||
bool block, void *user_data)
|
bool block, void *user_data)
|
||||||
{
|
{
|
||||||
int res;
|
return pw_loop_invoke(loop->loop, func, seq, data, size, block, user_data);
|
||||||
if (loop->running)
|
|
||||||
res = pw_loop_invoke(loop->loop, func, seq, data, size, block, user_data);
|
|
||||||
else
|
|
||||||
res = func(loop->loop->loop, false, seq, data, size, user_data);
|
|
||||||
return res;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Set a thread utils implementation.
|
/** Set a thread utils implementation.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue