]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
timeshift: fix wrong time position when LIVE, fixes #3505
authorJaroslav Kysela <perex@perex.cz>
Wed, 20 Jan 2016 15:22:34 +0000 (16:22 +0100)
committerJaroslav Kysela <perex@perex.cz>
Wed, 20 Jan 2016 15:22:34 +0000 (16:22 +0100)
src/timeshift/timeshift_reader.c

index bb49d871eaf912621f18caf849637e5cd01a301f..4e625518cb12ddd3e761002813434d42ace61150 100644 (file)
@@ -483,10 +483,14 @@ static void timeshift_fill_status
 
   start = _timeshift_first_time(ts, &active);
   end   = ts->buf_time;
-  if (current_time < 0)
-    current_time = 0;
-  if (current_time > end)
+  if (ts->state <= TS_LIVE) {
     current_time = end;
+  } else {
+    if (current_time < 0)
+      current_time = 0;
+    if (current_time > end)
+      current_time = end;
+  }
   status->full = ts->full;
   tvhtrace("timeshift", "ts %d status start %"PRId64" end %"PRId64
                         " current %"PRId64" state %d",