mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
pulse-server: flush after we push the last buffer
This commit is contained in:
parent
abbb034fa4
commit
b223261240
1 changed files with 5 additions and 1 deletions
|
|
@ -1219,6 +1219,7 @@ static void stream_process(void *data)
|
|||
struct spa_buffer *buf;
|
||||
uint32_t size, minreq = 0, index;
|
||||
struct process_data pd;
|
||||
bool do_flush = false;
|
||||
|
||||
if (stream->create_tag != SPA_ID_INVALID)
|
||||
return;
|
||||
|
|
@ -1252,7 +1253,7 @@ static void stream_process(void *data)
|
|||
|
||||
if (stream->draining) {
|
||||
stream->draining = false;
|
||||
pw_stream_flush(stream->stream, true);
|
||||
do_flush = true;
|
||||
} else {
|
||||
pd.underrun_for = size;
|
||||
pd.underrun = true;
|
||||
|
|
@ -1329,6 +1330,9 @@ static void stream_process(void *data)
|
|||
}
|
||||
pw_stream_queue_buffer(stream->stream, buffer);
|
||||
|
||||
if (do_flush)
|
||||
pw_stream_flush(stream->stream, true);
|
||||
|
||||
pw_stream_get_time(stream->stream, &pd.pwt);
|
||||
|
||||
pw_loop_invoke(impl->loop,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue