]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
psip: convert start times
authorLauri Myllari <lauri.myllari@gmail.com>
Mon, 12 Jan 2015 04:36:17 +0000 (20:36 -0800)
committerJaroslav Kysela <perex@perex.cz>
Thu, 22 Oct 2015 15:33:59 +0000 (17:33 +0200)
src/epggrab/module/psip.c

index f4b91b09c025a4d8a8e35feb377023f2d14612a8..8d39ca84145e70f111d9575cd3b4bc43271bf5b6 100644 (file)
@@ -115,12 +115,14 @@ _psip_eit_callback
   for (i = 0; i < count && len >= 12; i++) {
     uint16_t eventid;
     uint32_t starttime, length;
+    time_t start;
     uint8_t titlelen;
     unsigned int dlen;
     char buf[512];
 
     eventid = (ptr[0] & 0x3f) << 8 | ptr[1];
     starttime = ptr[2] << 24 | ptr[3] << 16 | ptr[4] << 8 | ptr[5];
+    start = atsc_convert_gpstime(starttime);
     length = (ptr[6] & 0x0f) << 16 | ptr[7] << 8 | ptr[8];
     titlelen = ptr[9];
     dlen = ((ptr[10+titlelen] & 0x0f) << 8) | ptr[11+titlelen];
@@ -130,8 +132,8 @@ _psip_eit_callback
 
     atsc_get_string(buf, 512, &ptr[10], titlelen, "eng");
 
-    tvhdebug("psip", "  %03d: 0x%04x at %d, duration %d, title: '%s' (%d bytes)",
-      i, eventid, starttime, length, buf, titlelen);
+    tvhdebug("psip", "  %03d: 0x%04x at %"PRItime_t", duration %d, title: '%s' (%d bytes)",
+      i, eventid, start, length, buf, titlelen);
 
     /* Move on */
 // next: