[pulseaudio-discuss] [PATCH] tunnel-sink-new: Fix requested latency check

Tanu Kaskinen tanu.kaskinen at linux.intel.com
Tue Oct 7 06:56:55 PDT 2014


This fixes a bug in latency configuration. The wrong type in the cast
caused UINT64_MAX being not treated as special, so the configured
latency was set to UINT64_MAX usecs, which of course is absurdly huge
latency.
---
 src/modules/module-tunnel-sink-new.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/modules/module-tunnel-sink-new.c b/src/modules/module-tunnel-sink-new.c
index c74a7c1..e4c65f5 100644
--- a/src/modules/module-tunnel-sink-new.c
+++ b/src/modules/module-tunnel-sink-new.c
@@ -319,7 +319,7 @@ static void context_state_cb(pa_context *c, void *userdata) {
             }
 
             requested_latency = pa_sink_get_requested_latency_within_thread(u->sink);
-            if (requested_latency == (uint32_t) -1)
+            if (requested_latency == (pa_usec_t) -1)
                 requested_latency = u->sink->thread_info.max_latency;
 
             reset_bufferattr(&bufferattr);
-- 
1.9.3



More information about the pulseaudio-discuss mailing list