]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
epggrab: delay internal grabbers by 120 seconds on init
authorJaroslav Kysela <perex@perex.cz>
Tue, 24 Nov 2015 18:59:58 +0000 (19:59 +0100)
committerJaroslav Kysela <perex@perex.cz>
Tue, 24 Nov 2015 19:00:00 +0000 (20:00 +0100)
I detected some strange memory allocation errors. Yes, it's workaround
but valgrind cannot detect anything suspicious. It's hardly realtime
consequence.

src/epggrab.c

index dafeea48d2ffc52df671750ea8c6f0b0f867484c..d18a845e764615101f0ba500ed39cda42e2969c5 100644 (file)
@@ -94,6 +94,14 @@ static void* _epggrab_internal_thread ( void* p )
   ts.tv_nsec = 0; 
   time(&ts.tv_sec);
 
+  /* Time for other jobs */
+  t = dispatch_clock + 120;
+  while (epggrab_running) {
+    if (t < dispatch_clock)
+      break;
+    usleep(200000);
+  }
+
   while (epggrab_running) {
 
     /* Check for config change */