From c4f60d596083158334498dedb9f9e3021c67ae65 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 27 May 2008 22:08:42 +0000 Subject: 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 --- src/pulsecore/protocol-simple.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/pulsecore/protocol-simple.c') diff --git a/src/pulsecore/protocol-simple.c b/src/pulsecore/protocol-simple.c index cbe48440..e1534277 100644 --- a/src/pulsecore/protocol-simple.c +++ b/src/pulsecore/protocol-simple.c @@ -374,6 +374,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); -- cgit