mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-10 13:30:05 -05:00
stream: keep calling process when there is data
Don't only call the process function when we have a new buffer but also when we still have something in the queue to process.
This commit is contained in:
parent
7a629fa378
commit
d24c8da5d2
1 changed files with 5 additions and 2 deletions
|
|
@ -1035,12 +1035,15 @@ static int impl_node_process_input(void *object)
|
|||
/* push new buffer */
|
||||
pw_log_trace_fp("%p: push %d %p", stream, b->id, io);
|
||||
if (queue_push(impl, &impl->dequeued, b) == 0) {
|
||||
copy_position(impl, impl->dequeued.incount);
|
||||
if (b->busy)
|
||||
ATOMIC_INC(b->busy->count);
|
||||
}
|
||||
}
|
||||
if (!queue_is_empty(impl, &impl->dequeued)) {
|
||||
copy_position(impl, impl->dequeued.incount);
|
||||
call_process(impl);
|
||||
}
|
||||
}
|
||||
|
||||
if (io->status != SPA_STATUS_NEED_DATA || io->buffer_id == SPA_ID_INVALID) {
|
||||
/* pop buffer to recycle */
|
||||
if ((b = queue_pop(impl, &impl->queued))) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue