mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
correct a recording bug in native protocol
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@181 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
566e469bbe
commit
3536be420c
4 changed files with 11 additions and 8 deletions
|
|
@ -378,12 +378,14 @@ static void send_memblock(struct connection *c) {
|
|||
return;
|
||||
|
||||
if (pa_memblockq_peek(r->memblockq, &chunk) >= 0) {
|
||||
if (chunk.length > r->fragment_size)
|
||||
chunk.length = r->fragment_size;
|
||||
struct pa_memchunk schunk = chunk;
|
||||
|
||||
if (schunk.length > r->fragment_size)
|
||||
schunk.length = r->fragment_size;
|
||||
|
||||
pa_pstream_send_memblock(c->pstream, r->index, 0, &chunk);
|
||||
pa_memblockq_drop(r->memblockq, &chunk, chunk.length);
|
||||
pa_memblock_unref(chunk.memblock);
|
||||
pa_pstream_send_memblock(c->pstream, r->index, 0, &schunk);
|
||||
pa_memblockq_drop(r->memblockq, &chunk, schunk.length);
|
||||
pa_memblock_unref(schunk.memblock);
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue