]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
globalheaders: separate overall scan time and no-packet time
authorJaroslav Kysela <perex@perex.cz>
Thu, 11 Oct 2018 12:18:55 +0000 (14:18 +0200)
committerJaroslav Kysela <perex@perex.cz>
Thu, 11 Oct 2018 12:18:58 +0000 (14:18 +0200)
src/plumbing/globalheaders.c

index c0cd23d09af61ea4ab963ad1026ecee902542640..ecd560ec668bf0ac8eb292b429d33d9003780ccf 100644 (file)
@@ -35,7 +35,8 @@ typedef struct globalheaders {
 } globalheaders_t;
 
 /* note: there up to 2.5 sec diffs in some sources! */
-#define MAX_SCAN_TIME 5000  // in ms
+#define MAX_SCAN_TIME   5000  // in ms
+#define MAX_NOPKT_TIME  2500  // in ms
 
 /**
  *
@@ -236,7 +237,7 @@ headers_complete(globalheaders_t *gh)
        * - half timeout is reached without any packets seen
        * - maximal timeout is reached without metadata
        */
-      if(threshold || (qd[i] <= 0 && qd_max > (MAX_SCAN_TIME * 90) / 2)) {
+      if(threshold || (qd[i] <= 0 && qd_max > (MAX_NOPKT_TIME * 90))) {
        ssc->ssc_disabled = 1;
         tvhdebug(LS_GLOBALHEADERS, "gh disable stream %d %s%s%s (PID %i) threshold %d qd %"PRId64" qd_max %"PRId64,
              ssc->es_index, streaming_component_type2txt(ssc->es_type),