From 4a825789a8e828c26b3a3bfbd036cd0d555c1676 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20T=C3=B6rnblom?= Date: Thu, 6 Sep 2012 12:10:22 +0200 Subject: [PATCH] fix 100% cpu usage of rawtsinput when no subscription is active --- src/rawtsinput.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/rawtsinput.c b/src/rawtsinput.c index ef1a5385..98e199a3 100644 --- a/src/rawtsinput.c +++ b/src/rawtsinput.c @@ -286,6 +286,7 @@ raw_ts_reader(void *aux) { rawts_t *rt = aux; uint8_t tsblock[188]; + struct timespec tm = {0, 0}; int c = 0; int i; @@ -299,6 +300,7 @@ raw_ts_reader(void *aux) c++; process_ts_packet(rt, tsblock); } + nanosleep(&tm, NULL); } return NULL;