mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-07 13:30:09 -05:00
stream: don't ask for 0 size buffer
This commit is contained in:
parent
6041d939a0
commit
5fc1ab90f7
1 changed files with 9 additions and 3 deletions
|
|
@ -549,7 +549,7 @@ static int impl_set_param(void *object, uint32_t id, uint32_t flags, const struc
|
|||
|
||||
static inline uint32_t update_requested(struct stream *impl)
|
||||
{
|
||||
uint32_t index, id;
|
||||
uint32_t index, id, res = 0;
|
||||
struct buffer *buffer;
|
||||
struct spa_io_rate_match *r = impl->rate_match;
|
||||
|
||||
|
|
@ -558,9 +558,15 @@ static inline uint32_t update_requested(struct stream *impl)
|
|||
|
||||
id = impl->dequeued.ids[index & MASK_BUFFERS];
|
||||
buffer = &impl->buffers[id];
|
||||
buffer->this.requested = r ? r->size : 0;
|
||||
if (r) {
|
||||
buffer->this.requested = r->size;
|
||||
res = r->size > 0 ? 1 : 0;
|
||||
} else {
|
||||
buffer->this.requested = 0;
|
||||
res = 1;
|
||||
}
|
||||
pw_log_trace_fp("%p: update buffer:%u size:%u", impl, id, r->size);
|
||||
return 1;
|
||||
return res;
|
||||
}
|
||||
|
||||
static int impl_send_command(void *object, const struct spa_command *command)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue