summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/protocol-native.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-01-18 01:33:04 +0100
committerColin Guthrie <cguthrie@mandriva.org>2010-02-09 22:45:59 +0000
commit66cfa72eb4fd4669dfd7e465c07c41bb7e6d3d85 (patch)
treeac2d6575205b0e364cf869d991e3894bcc4844c0 /src/pulsecore/protocol-native.c
parentd09099526220fb87ac8c4f6bae298b23744d0dae (diff)
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.
Diffstat (limited to 'src/pulsecore/protocol-native.c')
-rw-r--r--src/pulsecore/protocol-native.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/pulsecore/protocol-native.c b/src/pulsecore/protocol-native.c
index 89f33d08..ff246120 100644
--- a/src/pulsecore/protocol-native.c
+++ b/src/pulsecore/protocol-native.c
@@ -1326,6 +1326,10 @@ static void handle_seek(playback_stream *s, int64_t indexw) {
playback_stream_request_bytes(s);
}
+static void flush_write_no_account(pa_memblockq *q) {
+ pa_memblockq_flush_write(q, FALSE);
+}
+
/* Called from thread context */
static int sink_input_process_msg(pa_msgobject *o, int code, void *userdata, int64_t offset, pa_memchunk *chunk) {
pa_sink_input *i = PA_SINK_INPUT(o);
@@ -1387,7 +1391,7 @@ static int sink_input_process_msg(pa_msgobject *o, int code, void *userdata, int
switch (code) {
case SINK_INPUT_MESSAGE_FLUSH:
- func = pa_memblockq_flush_write;
+ func = flush_write_no_account;
break;
case SINK_INPUT_MESSAGE_PREBUF_FORCE: