]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
capmt: add running check to wait loop
authorJaroslav Kysela <perex@perex.cz>
Tue, 30 Jan 2018 12:43:32 +0000 (13:43 +0100)
committerJaroslav Kysela <perex@perex.cz>
Tue, 30 Jan 2018 12:43:32 +0000 (13:43 +0100)
src/descrambler/capmt.c

index 571bf8d4fa5e6e6cc7a25e072f43042517b13034..a20ce765b2660307095fffaafceca66b4b7a6840 100644 (file)
@@ -1948,7 +1948,7 @@ capmt_thread(void *aux)
       i = tvh_cond_timedwait(&capmt->capmt_cond, &capmt->capmt_mutex, mono);
       if (i == ETIMEDOUT)
         break;
-    } while (ERRNO_AGAIN(i));
+    } while (ERRNO_AGAIN(i) && atomic_get(&capmt->capmt_running));
 
     pthread_mutex_unlock(&capmt->capmt_mutex);
   }