From: Lauri Myllari Date: Mon, 12 Jan 2015 04:36:17 +0000 (-0800) Subject: psip: convert start times X-Git-Tag: v4.2.1~1822 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1d36d5954f6be1aa97cd5058e75734a06f6dbec0;p=thirdparty%2Ftvheadend.git psip: convert start times --- diff --git a/src/epggrab/module/psip.c b/src/epggrab/module/psip.c index f4b91b09c..8d39ca841 100644 --- a/src/epggrab/module/psip.c +++ b/src/epggrab/module/psip.c @@ -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: