]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
tsfix: fix dts calc (fixes issue #5252)
authorLuis Alves <ljalvs@gmail.com>
Fri, 12 Oct 2018 12:14:52 +0000 (13:14 +0100)
committerJaroslav Kysela <perex@perex.cz>
Fri, 12 Oct 2018 17:31:21 +0000 (19:31 +0200)
src/plumbing/tsfix.c

index c75df6362e1eb54acf662a4e5f2b60034f1e6feb..4b4843e5d1920ea42d099338bbedd655bed68270 100644 (file)
@@ -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) {