]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
update system time from DVB immediatelly after start
authorJaroslav Kysela <perex@perex.cz>
Sat, 8 Apr 2017 07:53:37 +0000 (09:53 +0200)
committerJaroslav Kysela <perex@perex.cz>
Sat, 8 Apr 2017 07:53:37 +0000 (09:53 +0200)
src/input/mpegts/dvb_psi.c

index 514ab31dea08cb616326afaaaf2f71ffac8a92ec..ec73aaafc715137a312d88586e1a2eec0d4cfe69 100644 (file)
@@ -2551,7 +2551,7 @@ static void dvb_time_update(const uint8_t *ptr, const char *srcname)
 {
   static int64_t dvb_last_update = 0;
   time_t t;
-  if (dvb_last_update + sec2mono(1800) < mclk()) {
+  if (dvb_last_update == 0 || dvb_last_update + sec2mono(1800) < mclk()) {
     t = dvb_convert_date(ptr, 0);
     if (t > 0) {
       tvhtime_update(t, srcname);