stream: handle drain from process

When process calls drain, also do one more loop to complete
the drain.
This commit is contained in:
Wim Taymans 2021-01-21 13:41:06 +01:00
parent 486d797735
commit f96c7ede11

View file

@ -857,7 +857,8 @@ again:
/* realtime and we don't have a buffer, trigger process and try
* again when there is something in the queue now */
call_process(impl);
if (spa_ringbuffer_get_read_index(&impl->queued.ring, &index) > 0)
if (impl->draining ||
spa_ringbuffer_get_read_index(&impl->queued.ring, &index) > 0)
goto again;
}
}