mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-06 13:29:56 -05:00
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
This commit is contained in:
parent
1d7096b19e
commit
e279778848
1 changed files with 5 additions and 2 deletions
|
|
@ -205,8 +205,10 @@ static int do_write(connection *c) {
|
||||||
if (!c->source_output)
|
if (!c->source_output)
|
||||||
return 0;
|
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;
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
pa_assert(chunk.memblock);
|
pa_assert(chunk.memblock);
|
||||||
pa_assert(chunk.length);
|
pa_assert(chunk.length);
|
||||||
|
|
@ -276,7 +278,8 @@ static int connection_process_msg(pa_msgobject *o, int code, void*userdata, pa_m
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MESSAGE_POST_DATA:
|
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);
|
do_work(c);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue