diff options
author | Lennart Poettering <lennart@poettering.net> | 2008-05-27 22:05:31 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2008-05-27 22:05:31 +0000 |
commit | 307645e6210a16ab1430972e260b8518f38474ad (patch) | |
tree | 0ba1251ddc9e1aac2ef7d9b3498699918f16319c | |
parent | 21dedcb9d90734de96f17043d03183e2ab599583 (diff) |
fix esound proto to not crash
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2488 fefdeb5f-60dc-0310-8127-8f9354f1896f
-rw-r--r-- | src/pulsecore/protocol-esound.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pulsecore/protocol-esound.c b/src/pulsecore/protocol-esound.c index 492dc9fa..22b49b58 100644 --- a/src/pulsecore/protocol-esound.c +++ b/src/pulsecore/protocol-esound.c @@ -1042,7 +1042,7 @@ static int do_read(connection *c) { } if (!c->playback.current_memblock) { - pa_assert_se(c->playback.current_memblock = pa_memblock_new(c->protocol->core->mempool, 0)); + pa_assert_se(c->playback.current_memblock = pa_memblock_new(c->protocol->core->mempool, (size_t) -1)); c->playback.memblock_index = 0; space = pa_memblock_get_length(c->playback.current_memblock); @@ -1275,6 +1275,8 @@ static int sink_input_pop_cb(pa_sink_input *i, size_t length, pa_memchunk *chunk } else { size_t m; + chunk->length = PA_MIN(length, chunk->length); + c->playback.underrun = FALSE; pa_memblockq_drop(c->input_memblockq, chunk->length); |