summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/protocol-esound.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-01-08 21:51:30 +0100
committerColin Guthrie <cguthrie@mandriva.org>2010-02-09 22:29:38 +0000
commit345547853bcb0825c0afb5b2528a8f1d5339a8ea (patch)
treee59a2032ac562f60d419a1095f9b19fb432d8f05 /src/pulsecore/protocol-esound.c
parent699233fb47d133f6ea1e36e8354a386c23608d5a (diff)
core: make sure we always return a valid memblock in sink_input_pop() callbacks
https://bugzilla.redhat.com/show_bug.cgi?id=553607
Diffstat (limited to 'src/pulsecore/protocol-esound.c')
-rw-r--r--src/pulsecore/protocol-esound.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/pulsecore/protocol-esound.c b/src/pulsecore/protocol-esound.c
index 2326eb3a..a89f3275 100644
--- a/src/pulsecore/protocol-esound.c
+++ b/src/pulsecore/protocol-esound.c
@@ -389,6 +389,7 @@ static int esd_proto_stream_play(connection *c, esd_proto_t request, const void
size_t l;
pa_sink *sink = NULL;
pa_sink_input_new_data sdata;
+ pa_memchunk silence;
connection_assert_ref(c);
pa_assert(data);
@@ -435,6 +436,7 @@ static int esd_proto_stream_play(connection *c, esd_proto_t request, const void
CHECK_VALIDITY(c->sink_input, "Failed to create sink input.");
l = (size_t) ((double) pa_bytes_per_second(&ss)*PLAYBACK_BUFFER_SECONDS);
+ pa_sink_input_get_silence(c->sink_input, &silence);
c->input_memblockq = pa_memblockq_new(
0,
l,
@@ -443,7 +445,8 @@ static int esd_proto_stream_play(connection *c, esd_proto_t request, const void
(size_t) -1,
l/PLAYBACK_BUFFER_FRAGMENTS,
0,
- NULL);
+ &silence);
+ pa_memblock_unref(silence.memblock);
pa_iochannel_socket_set_rcvbuf(c->io, l);
c->sink_input->parent.process_msg = sink_input_process_msg;