From 84782f24c5f43456430c796bd12f9face24f0573 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 18 Jan 2010 01:33:04 +0100 Subject: native: rework handling of seeks that depend on variables the client does not know anything about All seeks/flushes that depend on the playback buffer read pointer cannot be accounted for properly in the client since it does not know the actual read pointer. Due to that the clients do not account for it at all. We need do the same on the server side. And we did, but a little bit too extreme. While we properly have not applied the changes to the "request" counter we still do have to apply it to the "missing" counter. This patch fixes that. --- src/pulse/stream.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/pulse') diff --git a/src/pulse/stream.c b/src/pulse/stream.c index ab8f8f43..8da40eca 100644 --- a/src/pulse/stream.c +++ b/src/pulse/stream.c @@ -2146,6 +2146,11 @@ pa_operation* pa_stream_flush(pa_stream *s, pa_stream_success_cb_t cb, void *use * index, but the read index might jump. */ invalidate_indexes(s, TRUE, FALSE); + /* Note that we do not update requested_bytes here. This is + * because we cannot really know how data actually was dropped + * from the write index due to this. This 'error' will be applied + * by both client and server and hence we should be fine. */ + return o; } -- cgit