summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2007-06-14 20:13:44 +0000
committerLennart Poettering <lennart@poettering.net>2007-06-14 20:13:44 +0000
commite279778848f07c4c6ebb7b02555eea83d57430d5 (patch)
tree148df1b9648c8ee8d91a209b3befb172d6e266aa
parent1d7096b19e0671ecc2824fda96cdd94b125eb80b (diff)
use pa_memblockq_push_align() instead of pa_memblockq_push() to deal with unaligned data coming from clients
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1482 fefdeb5f-60dc-0310-8127-8f9354f1896f
-rw-r--r--src/pulsecore/protocol-simple.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/pulsecore/protocol-simple.c b/src/pulsecore/protocol-simple.c
index 288c1c03..0e978c63 100644
--- a/src/pulsecore/protocol-simple.c
+++ b/src/pulsecore/protocol-simple.c
@@ -205,8 +205,10 @@ static int do_write(connection *c) {
if (!c->source_output)
return 0;
- if (pa_memblockq_peek(c->output_memblockq, &chunk) < 0)
+ if (pa_memblockq_peek(c->output_memblockq, &chunk) < 0) {
+/* pa_log("peek failed"); */
return 0;
+ }
pa_assert(chunk.memblock);
pa_assert(chunk.length);
@@ -276,7 +278,8 @@ static int connection_process_msg(pa_msgobject *o, int code, void*userdata, pa_m
break;
case MESSAGE_POST_DATA:
- pa_memblockq_push(c->output_memblockq, chunk);
+/* pa_log("got data %u", chunk->length); */
+ pa_memblockq_push_align(c->output_memblockq, chunk);
do_work(c);
break;