mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
pulse-server: request more data when seeking backwards
Immediately ask for more data when we seek backwards so that we don't underrun in the next process cycle. See #1981
This commit is contained in:
parent
ab425d44b8
commit
222ef88704
1 changed files with 8 additions and 0 deletions
|
|
@ -188,6 +188,14 @@ static int handle_memblock(struct client *client, struct message *msg)
|
|||
spa_ringbuffer_write_update(&stream->ring, index);
|
||||
stream->requested -= SPA_MIN(msg->length, stream->requested);
|
||||
|
||||
if (diff < 0) {
|
||||
/* when we seek backwards, ask for the additional missing data
|
||||
* immediately so that we don't underrun in the next process */
|
||||
pw_log_info("client %p [%s]: backwards seek of: %" PRIi64,
|
||||
client, client->name, diff);
|
||||
stream_send_request(stream);
|
||||
}
|
||||
|
||||
finish:
|
||||
message_free(impl, msg, false, false);
|
||||
return res;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue