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/modules/module-ladspa-sink.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/modules/module-ladspa-sink.c') diff --git a/src/modules/module-ladspa-sink.c b/src/modules/module-ladspa-sink.c index 6033f710..9a54202c 100644 --- a/src/modules/module-ladspa-sink.c +++ b/src/modules/module-ladspa-sink.c @@ -185,6 +185,7 @@ static int sink_input_pop_cb(pa_sink_input *i, size_t nbytes, pa_memchunk *chunk pa_memblock_unref(nchunk.memblock); } + tchunk.length = PA_MIN(nbytes, tchunk.length); pa_assert(tchunk.length > 0); fs = pa_frame_size(&i->sample_spec); -- cgit