From 433bcd2e53da6ab9bc58764460a52e93c8f78f66 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 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) { -- 2.47.2