From: Jaroslav Kysela Date: Thu, 23 Oct 2014 16:19:11 +0000 (+0200) Subject: timeshift: add little comment to last pts delta fix X-Git-Tag: v4.1~911 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ad44b0acfe93201aa3f166d5169cdf9f888e401;p=thirdparty%2Ftvheadend.git timeshift: add little comment to last pts delta fix --- diff --git a/src/timeshift.c b/src/timeshift.c index de4b0675a..6f1ab5dec 100644 --- a/src/timeshift.c +++ b/src/timeshift.c @@ -171,6 +171,12 @@ static void timeshift_input /* Record (one-off) PTS delta */ if (sm->sm_type == SMT_PACKET && ts->pts_delta == PTS_UNSET) { if (pkt->pkt_pts != PTS_UNSET) { + /* + * Gather some packets and select the lowest pts to identify + * the correct start. Note that for timeshift, the tsfix + * stream plugin is applied, so the starting pts should be + * near zero. If not - it's a bug. + */ int i; int64_t smallest = INT64_MAX; for (i = 0; i < ARRAY_SIZE(ts->pts_val); i++) {