From 6590060c36616466da9f26604b7b829865f431b1 Mon Sep 17 00:00:00 2001 From: Luis Alves Date: Fri, 12 Oct 2018 13:14:52 +0100 Subject: [PATCH] tsfix: fix dts calc (fixes issue #5252) --- src/plumbing/tsfix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plumbing/tsfix.c b/src/plumbing/tsfix.c index 05ff8fa70..511133b84 100644 --- a/src/plumbing/tsfix.c +++ b/src/plumbing/tsfix.c @@ -231,7 +231,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) { -- 2.47.2