]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
descrambler: key_late - tune the key change times
authorJaroslav Kysela <perex@perex.cz>
Fri, 9 Jun 2017 09:50:58 +0000 (11:50 +0200)
committerJaroslav Kysela <perex@perex.cz>
Fri, 9 Jun 2017 09:50:58 +0000 (11:50 +0200)
src/descrambler/descrambler.c

index 3d3f2fc154dd3a3ffef4c151cc4b2bf5afc99dae..357596eee23cce0149778dfd7ef66b6b2e424125 100644 (file)
@@ -806,12 +806,12 @@ key_late( th_descrambler_runtime_t *dr, th_descrambler_key_t *tk, uint8_t ki, in
   /* required key is older than previous? */
   if (tk->key_timestamp[kidx] < tk->key_timestamp[kidx^1]) {
     /* but don't take in account the keys modified just now */
-    if (tk->key_timestamp[kidx^1] + 2 < timestamp)
+    if (tk->key_timestamp[kidx^1] + ms2mono(350) < timestamp)
       goto late;
   }
   /* ECM was sent, but no new key was received */
   if (dr->dr_ecm_last_key_time + dr->dr_ecm_key_margin < tk->key_start &&
-      (!dr->dr_quick_ecm || dr->dr_ecm_start[kidx] + 4 < tk->key_start)) {
+      (!dr->dr_quick_ecm || dr->dr_ecm_start[kidx] + ms2mono(10) < tk->key_start)) {
 late:
     tk->key_valid &= ~((ki & 0x40) + 0x40);
     return 1;