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:
Wim Taymans 2022-08-09 20:15:04 +02:00
parent 9d5f565682
commit 32cf5f312b

View file

@ -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,
bool block, void *user_data)
{
int res;
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;
return pw_loop_invoke(loop->loop, func, seq, data, size, block, user_data);
}
/** Set a thread utils implementation.