From: Jaroslav Kysela Date: Wed, 30 Dec 2015 20:55:26 +0000 (+0100) Subject: timeshift: fix time init for reader X-Git-Tag: v4.2.1~1261 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=49ab691edc6de6b5bac09fe919c34041d7ed7ec5;p=thirdparty%2Ftvheadend.git timeshift: fix time init for reader --- diff --git a/src/timeshift/timeshift_reader.c b/src/timeshift/timeshift_reader.c index 1d7bb3046..f61ad42cb 100644 --- a/src/timeshift/timeshift_reader.c +++ b/src/timeshift/timeshift_reader.c @@ -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); }