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:
Wim Taymans 2022-01-07 10:59:41 +01:00
parent ab425d44b8
commit 222ef88704

View file

@ -188,6 +188,14 @@ static int handle_memblock(struct client *client, struct message *msg)
spa_ringbuffer_write_update(&stream->ring, index); spa_ringbuffer_write_update(&stream->ring, index);
stream->requested -= SPA_MIN(msg->length, stream->requested); 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: finish:
message_free(impl, msg, false, false); message_free(impl, msg, false, false);
return res; return res;