summaryrefslogtreecommitdiffstats
path: root/src/pulsecore
diff options
context:
space:
mode:
Diffstat (limited to 'src/pulsecore')
-rw-r--r--src/pulsecore/sink.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c
index 141084d6..db9b4f3a 100644
--- a/src/pulsecore/sink.c
+++ b/src/pulsecore/sink.c
@@ -1025,14 +1025,13 @@ void pa_sink_render_full(pa_sink *s, size_t length, pa_memchunk *result) {
pa_memchunk chunk;
size_t l, d;
pa_memchunk_make_writable(result, length);
- result->length = length;
l = length - result->length;
d = result->index + result->length;
while (l > 0) {
chunk = *result;
- chunk.index += d;
- chunk.length -= d - result->index;
+ chunk.index = d;
+ chunk.length = l;
pa_sink_render_into(s, &chunk);