mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
stream: always call the process function when triggered
When we are triggered, always call the process function, even if we don't have buffers yet. We need to do this because a usual pattern is to dequeue a buffer from the capture stream and feed it into a playback stream. When we don't call the process function if the playback stream is not negotiated yet, we will run out of buffers in the capture stream and stall. This might also be able to fix this by calling the process function of the capture stream when we still have queued buffers that need to be processed but this might require some more adapter changes. Fixes #3028
This commit is contained in:
parent
a2b391b5c7
commit
92c4a916fb
1 changed files with 4 additions and 2 deletions
|
|
@ -388,8 +388,10 @@ static inline uint32_t update_requested(struct stream *impl)
|
|||
struct buffer *buffer;
|
||||
struct spa_io_rate_match *r = impl->rate_match;
|
||||
|
||||
if (spa_ringbuffer_get_read_index(&impl->dequeued.ring, &index) < 1)
|
||||
return 0;
|
||||
if (spa_ringbuffer_get_read_index(&impl->dequeued.ring, &index) < 1) {
|
||||
pw_log_debug("%p: no free buffers %d", impl, impl->n_buffers);
|
||||
return impl->using_trigger ? 1 : 0;
|
||||
}
|
||||
|
||||
id = impl->dequeued.ids[index & MASK_BUFFERS];
|
||||
buffer = &impl->buffers[id];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue