From: Luis Alves Date: Fri, 12 Oct 2018 12:14:52 +0000 (+0100) Subject: tsfix: fix dts calc (fixes issue #5252) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=433bcd2e53da6ab9bc58764460a52e93c8f78f66;p=thirdparty%2Ftvheadend.git tsfix: fix dts calc (fixes issue #5252) --- diff --git a/src/plumbing/tsfix.c b/src/plumbing/tsfix.c index c75df6362..4b4843e5d 100644 --- a/src/plumbing/tsfix.c +++ b/src/plumbing/tsfix.c @@ -235,7 +235,7 @@ normalize_ts(tsfix_t *tf, tfstream_t *tfs, th_pkt_t *pkt, int backlog) pkt->pkt_dts &= PTS_MASK; /* Subtract the transport wide start offset */ - dts = pkt->pkt_dts - ref; + dts = pts_diff(ref, pkt->pkt_dts); if (tfs->tfs_last_dts_norm == PTS_UNSET) { if (dts < 0 || pkt->pkt_err) {