summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/sink.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pulsecore/sink.c')
-rw-r--r--src/pulsecore/sink.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c
index d5ca061f..ced23a51 100644
--- a/src/pulsecore/sink.c
+++ b/src/pulsecore/sink.c
@@ -361,7 +361,7 @@ void pa_sink_render(pa_sink*s, size_t length, pa_memchunk *result) {
pa_sink_ref(s);
- n = fill_mix_info(s, info, MAX_MIX_CHANNELS);
+ n = s->thread_info.state == PA_SINK_RUNNING ? fill_mix_info(s, info, MAX_MIX_CHANNELS) : 0;
if (n == 0) {
@@ -426,7 +426,7 @@ void pa_sink_render_into(pa_sink*s, pa_memchunk *target) {
pa_sink_ref(s);
- n = fill_mix_info(s, info, MAX_MIX_CHANNELS);
+ n = s->thread_info.state == PA_SINK_RUNNING ? fill_mix_info(s, info, MAX_MIX_CHANNELS) : 0;
if (n == 0) {
pa_silence_memchunk(target, &s->sample_spec);