summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/sink.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-09-01 22:18:55 +0200
committerLennart Poettering <lennart@poettering.net>2009-09-01 22:18:55 +0200
commit17f609ac830a4a6be9658c7220292a038b2c59ac (patch)
tree6e48f7651d93568ab0c71a006d3f1a5a10819675 /src/pulsecore/sink.c
parentce6dff4ee0a3fe6e0339eb1f5d605caf8af3f989 (diff)
core: handle suspended state in pa_sink_render_full() similar to the other render functions
Diffstat (limited to 'src/pulsecore/sink.c')
-rw-r--r--src/pulsecore/sink.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c
index 2362db8d..e1ab96db 100644
--- a/src/pulsecore/sink.c
+++ b/src/pulsecore/sink.c
@@ -1099,7 +1099,16 @@ void pa_sink_render_full(pa_sink *s, size_t length, pa_memchunk *result) {
pa_assert(!s->thread_info.rewind_requested);
pa_assert(s->thread_info.rewind_nbytes == 0);
- pa_assert(length > 0);
+ if (s->thread_info.state == PA_SINK_SUSPENDED) {
+ pa_silence_memchunk_get(&s->core->silence_cache,
+ s->core->mempool,
+ result,
+ &s->sample_spec,
+ length1st);
+
+ pa_sink_unref(s);
+ return;
+ }
n = fill_mix_info(s, &length1st, info, MAX_MIX_CHANNELS);