summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorForest Bond <forest.bond@rapidrollout.com>2011-05-20 12:16:54 -0400
committerColin Guthrie <colin@mageia.org>2011-06-02 11:53:15 +0200
commit21ac93e4ebc160473e2e58f90a173ca0703e34e6 (patch)
treebc6e4db92097d35552aa9dca418505c7ce04f909 /src
parent249218b944ed0237ec66d56c08ed4dddf5e98d24 (diff)
module-combine-sink: Check running flag before rendering in null mode
This makes process_render_null consistent with render_memblock and avoids introducing slight inaccuracies in early latency estimates.
Diffstat (limited to 'src')
-rw-r--r--src/modules/module-combine-sink.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/modules/module-combine-sink.c b/src/modules/module-combine-sink.c
index 76ffbd508..72ee83cf3 100644
--- a/src/modules/module-combine-sink.c
+++ b/src/modules/module-combine-sink.c
@@ -261,6 +261,10 @@ static void process_render_null(struct userdata *u, pa_usec_t now) {
size_t ate = 0;
pa_assert(u);
+ /* If we are not running, we cannot produce any data */
+ if (!pa_atomic_load(&u->thread_info.running))
+ return;
+
if (u->thread_info.in_null_mode)
u->thread_info.timestamp = now;