mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-19 08:57:14 -05:00
work-queue: avoid invalid sequence numbers
This commit is contained in:
parent
5821f84c4b
commit
af1cf3d87a
1 changed files with 3 additions and 0 deletions
|
|
@ -175,6 +175,9 @@ pw_work_queue_add(struct pw_work_queue *queue, void *obj, int res, pw_work_func_
|
||||||
return SPA_ID_INVALID;
|
return SPA_ID_INVALID;
|
||||||
}
|
}
|
||||||
item->id = ++queue->counter;
|
item->id = ++queue->counter;
|
||||||
|
if (item->id == SPA_ID_INVALID)
|
||||||
|
item->id = ++queue->counter;
|
||||||
|
|
||||||
item->obj = obj;
|
item->obj = obj;
|
||||||
item->func = func;
|
item->func = func;
|
||||||
item->data = data;
|
item->data = data;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue