diff --git a/src/modules/module-combine-stream.c b/src/modules/module-combine-stream.c index 151d61b0f..bdc64afb2 100644 --- a/src/modules/module-combine-stream.c +++ b/src/modules/module-combine-stream.c @@ -965,8 +965,17 @@ static void combine_input_process(void *d) struct stream *s; bool delay_changed = false; - if ((in = pw_stream_dequeue_buffer(impl->combine)) == NULL) { - pw_log_debug("out of buffers: %m"); + in = NULL; + while (true) { + struct pw_buffer *t; + if ((t = pw_stream_dequeue_buffer(impl->combine)) == NULL) + break; + if (in) + pw_stream_queue_buffer(impl->combine, in); + in = t; + } + if (in == NULL) { + pw_log_debug("%p: out of input buffers: %m", impl); return; } @@ -980,7 +989,7 @@ static void combine_input_process(void *d) delay_changed = true; if ((out = pw_stream_dequeue_buffer(s->stream)) == NULL) { - pw_log_warn("out of playback buffers: %m"); + pw_log_warn("%p: out of playback buffers: %m", s); goto do_trigger; } @@ -1033,7 +1042,7 @@ static void combine_output_process(void *d) bool delay_changed = false; if ((out = pw_stream_dequeue_buffer(impl->combine)) == NULL) { - pw_log_debug("out of buffers: %m"); + pw_log_debug("%p: out of output buffers: %m", impl); return; } @@ -1046,8 +1055,17 @@ static void combine_output_process(void *d) if (check_stream_delay(s)) delay_changed = true; - if ((in = pw_stream_dequeue_buffer(s->stream)) == NULL) { - pw_log_warn("%p: out of capture buffers: %m", s); + in = NULL; + while (true) { + struct pw_buffer *t; + if ((t = pw_stream_dequeue_buffer(s->stream)) == NULL) + break; + if (in) + pw_stream_queue_buffer(s->stream, in); + in = t; + } + if (in == NULL) { + pw_log_debug("%p: out of input buffers: %m", s); continue; } s->ready = false;