summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/play-memblockq.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2008-05-27 22:08:42 +0000
committerLennart Poettering <lennart@poettering.net>2008-05-27 22:08:42 +0000
commitc4f60d596083158334498dedb9f9e3021c67ae65 (patch)
tree459cf0a9f0c0ea082eadc6def83714909e7fc351 /src/pulsecore/play-memblockq.c
parent7297bd91e77d59043956f9abd8370849016b05e4 (diff)
never hand out more data from a sink input than requested. Otherwise the resampler might run for too long and we get a heavy delay/underrun
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2490 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/pulsecore/play-memblockq.c')
-rw-r--r--src/pulsecore/play-memblockq.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/pulsecore/play-memblockq.c b/src/pulsecore/play-memblockq.c
index 2688f923..c2039ec0 100644
--- a/src/pulsecore/play-memblockq.c
+++ b/src/pulsecore/play-memblockq.c
@@ -138,6 +138,7 @@ static int sink_input_pop_cb(pa_sink_input *i, size_t nbytes, pa_memchunk *chunk
return -1;
}
+ chunk->length = PA_MIN(chunk->length, nbytes);
pa_memblockq_drop(u->memblockq, chunk->length);
return 0;