From: Lennart Poettering Date: Thu, 14 Jun 2007 20:13:44 +0000 (+0000) Subject: use pa_memblockq_push_align() instead of pa_memblockq_push() to deal with unaligned... X-Git-Tag: 1.0_branch~2762^2~1^2~480 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e279778848f07c4c6ebb7b02555eea83d57430d5;p=profile%2Fivi%2Fpulseaudio.git 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 --- diff --git a/src/pulsecore/protocol-simple.c b/src/pulsecore/protocol-simple.c index 288c1c0..0e978c6 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;