]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
dvb_support: change GPS UTC offset to one less
authorLauri Myllari <lauri.myllari@gmail.com>
Mon, 12 Jan 2015 05:02:57 +0000 (21:02 -0800)
committerJaroslav Kysela <perex@perex.cz>
Thu, 22 Oct 2015 15:33:59 +0000 (17:33 +0200)
Not sure why it's needed, but looking at STT samples it looks like the
offset is one less than I'd expect.

src/input/mpegts/dvb_support.c

index 749cf6dbb3cefba0a98b58d42d7ef9397fde4001..9ef1953f99f60d705c47041bf0f7d1c5937dcaed 100644 (file)
@@ -534,8 +534,9 @@ atsc_convert_gpstime(uint32_t gpstime)
 
   for (i = (sizeof(_gps_leap_seconds)/sizeof(time_t)) - 1; i >= 0; i--) {
     if (out > _gps_leap_seconds[i]) {
-      tvhwarn("gpstime", "leap seconds: %d", i+1);
-      out -= i+1;
+      // offset should be i+1, but sample STTs don't agree?
+      tvhdebug("gpstime", "leap seconds: %d", i);
+      out -= i;
       break;
     }
   }