pulse-server: handle the case where rate-match returns 0

Still feed the minreq amount of data into the converter.
This commit is contained in:
Wim Taymans 2021-08-23 17:27:45 +02:00
parent b0a9945ed0
commit 34e53113e2

View file

@ -1145,7 +1145,7 @@ static void stream_process(void *data)
void *p; void *p;
struct pw_buffer *buffer; struct pw_buffer *buffer;
struct spa_buffer *buf; struct spa_buffer *buf;
uint32_t size, minreq, index; uint32_t size, minreq = 0, index;
struct process_data pd; struct process_data pd;
pw_log_trace_fp(NAME" %p: process", stream); pw_log_trace_fp(NAME" %p: process", stream);
@ -1165,7 +1165,7 @@ static void stream_process(void *data)
if (stream->rate_match) if (stream->rate_match)
minreq = stream->rate_match->size * stream->frame_size; minreq = stream->rate_match->size * stream->frame_size;
else if (minreq == 0)
minreq = stream->attr.minreq; minreq = stream->attr.minreq;
if (avail < (int32_t)minreq || stream->corked) { if (avail < (int32_t)minreq || stream->corked) {