]> code.delx.au - pulseaudio/commitdiff
module-combine-sink: Check running flag before rendering in null mode
authorForest Bond <forest.bond@rapidrollout.com>
Fri, 20 May 2011 16:16:54 +0000 (12:16 -0400)
committerColin Guthrie <colin@mageia.org>
Thu, 2 Jun 2011 09:53:15 +0000 (11:53 +0200)
This makes process_render_null consistent with render_memblock and
avoids introducing slight inaccuracies in early latency estimates.

src/modules/module-combine-sink.c

index 76ffbd508714890c07f05ffd51d17f92fd3fbd93..72ee83cf379cca10cd2f24ebe3d1dc0bff5a742f 100644 (file)
@@ -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;