forked from pool/pulseaudio
47 lines
1.7 KiB
Diff
47 lines
1.7 KiB
Diff
|
From 30f28ebf3619a86b49009e8dbce154233f597dbb Mon Sep 17 00:00:00 2001
|
||
|
From: Lennart Poettering <lennart@poettering.net>
|
||
|
Date: Tue, 23 Feb 2010 00:48:35 +0100
|
||
|
Subject: [PATCH] esd,simple: use pa_memblockq_pop_missing()
|
||
|
|
||
|
We need to use pa_memblockq_pop_missing() for all request handling,
|
||
|
including the initial request, because otherwise the counters will be
|
||
|
stay off during the entire runtime.
|
||
|
|
||
|
This should fix:
|
||
|
|
||
|
https://bugzilla.redhat.com/show_bug.cgi?id=559467
|
||
|
---
|
||
|
src/pulsecore/protocol-esound.c | 2 +-
|
||
|
src/pulsecore/protocol-simple.c | 2 +-
|
||
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
||
|
|
||
|
diff --git a/src/pulsecore/protocol-esound.c b/src/pulsecore/protocol-esound.c
|
||
|
index a89f327..1e16334 100644
|
||
|
--- a/src/pulsecore/protocol-esound.c
|
||
|
+++ b/src/pulsecore/protocol-esound.c
|
||
|
@@ -462,7 +462,7 @@ static int esd_proto_stream_play(connection *c, esd_proto_t request, const void
|
||
|
|
||
|
c->protocol->n_player++;
|
||
|
|
||
|
- pa_atomic_store(&c->playback.missing, (int) pa_memblockq_missing(c->input_memblockq));
|
||
|
+ pa_atomic_store(&c->playback.missing, (int) pa_memblockq_pop_missing(c->input_memblockq));
|
||
|
|
||
|
pa_sink_input_put(c->sink_input);
|
||
|
|
||
|
diff --git a/src/pulsecore/protocol-simple.c b/src/pulsecore/protocol-simple.c
|
||
|
index fb2e564..77277e1 100644
|
||
|
--- a/src/pulsecore/protocol-simple.c
|
||
|
+++ b/src/pulsecore/protocol-simple.c
|
||
|
@@ -574,7 +574,7 @@ void pa_simple_protocol_connect(pa_simple_protocol *p, pa_iochannel *io, pa_simp
|
||
|
|
||
|
pa_iochannel_socket_set_rcvbuf(io, l);
|
||
|
|
||
|
- pa_atomic_store(&c->playback.missing, (int) pa_memblockq_missing(c->input_memblockq));
|
||
|
+ pa_atomic_store(&c->playback.missing, (int) pa_memblockq_pop_missing(c->input_memblockq));
|
||
|
|
||
|
pa_sink_input_put(c->sink_input);
|
||
|
}
|
||
|
--
|
||
|
1.6.0.2
|
||
|
|