From 81aa8ea37c8cc974246d580d25a604a6e309e472 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sat, 28 Jul 2007 22:55:44 +0000 Subject: drop data from inputs only when in running state git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1558 fefdeb5f-60dc-0310-8127-8f9354f1896f --- src/pulsecore/sink.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/pulsecore/sink.c') diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c index 015cf4d5..7f2a8b39 100644 --- a/src/pulsecore/sink.c +++ b/src/pulsecore/sink.c @@ -408,7 +408,8 @@ void pa_sink_render(pa_sink*s, size_t length, pa_memchunk *result) { result->index = 0; } - inputs_drop(s, info, n, result->length); + if (s->thread_info.state == PA_SINK_RUNNING) + inputs_drop(s, info, n, result->length); if (s->monitor_source) pa_source_post(s->monitor_source, result); @@ -472,7 +473,8 @@ void pa_sink_render_into(pa_sink*s, pa_memchunk *target) { pa_memblock_release(target->memblock); } - inputs_drop(s, info, n, target->length); + if (s->thread_info.state == PA_SINK_RUNNING) + inputs_drop(s, info, n, target->length); if (s->monitor_source) pa_source_post(s->monitor_source, target); -- cgit