summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/pulsecore/sink.c6
1 files changed, 4 insertions, 2 deletions
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);