]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
timeshift: fix time init for reader
authorJaroslav Kysela <perex@perex.cz>
Wed, 30 Dec 2015 20:55:26 +0000 (21:55 +0100)
committerJaroslav Kysela <perex@perex.cz>
Wed, 30 Dec 2015 20:55:26 +0000 (21:55 +0100)
src/timeshift/timeshift_reader.c

index 1d7bb3046031cafa43c59bdfbef57a34e5a0c4a5..f61ad42cbf471c61417ebfc9abbacd50a8b58b65 100644 (file)
@@ -646,7 +646,8 @@ void *timeshift_reader ( void *p )
                   pause_time     = cur_file->last;
                   last_time      = pause_time;
                 } else {
-                  last_time      = atomic_add_s64(&ts->last_time, 0);
+                  pause_time     = atomic_add_s64(&ts->last_time, 0);
+                  last_time      = pause_time;
                 }
                 pthread_mutex_unlock(&ts->rdwr_mutex);
                 mono_play_time = mono_now;
@@ -728,8 +729,7 @@ void *timeshift_reader ( void *p )
                   cur_file->roff = cur_file->size;
                   last_time      = cur_file->last;
                 } else {
-                  tvhlog(LOG_ERR, "timeshift", "ts %d failed to get current file", ts->id);
-                  skip = NULL;
+                  last_time      = atomic_add_s64(&ts->last_time, 0);
                 }
                 pthread_mutex_unlock(&ts->rdwr_mutex);
               }