Ver código fonte

reenable sync reset

Gil Pedersen 13 anos atrás
pai
commit
cc581e8a47
1 arquivos alterados com 4 adições e 4 exclusões
  1. 4 4
      lib/tssmooth.js

+ 4 - 4
lib/tssmooth.js

@@ -83,13 +83,13 @@ function TsSmooth(options) {
     var delta = pcrtime - self.pcrtime;
     if (delta > 100E3 || delta < 0) {
       console.error('PCR_error: '+(delta/1E6).toFixed(2)+'s missing');
-/*      var now = utime();
+      var now = utime();
       var error = now - pcrtime;
-      if (Math.abs(error) > 2*1E6) {
-        console.error('PCR sync reset');
+      if (Math.abs(error) > 60*1E6) {
+        console.error('PCR sync reset from '+(error/1E6).toFixed(2)+'s error');
         self.pcr = -1;
         pcrtime = self.pcr2time(newPCR);
-      }*/
+      }
     }
     self.pcrtime = pcrtime;
     return pcrtime;