From 4e1ed6ba6d14d18a278898a59b6b1f5ee25b70f0 Mon Sep 17 00:00:00 2001 From: "Alfred E. Heggestad" Date: Sun, 17 Dec 2017 15:25:54 +0100 Subject: stream: make rtp-timeout more robust against clock adjustment --- src/stream.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/stream.c b/src/stream.c index 641502f..38db2d6 100644 --- a/src/stream.c +++ b/src/stream.c @@ -52,6 +52,12 @@ static void check_rtp_handler(void *arg) debug("stream: last \"%s\" RTP packet: %d milliseconds\n", sdp_media_name(strm->sdp), diff_ms); + /* check for large jumps in time */ + if (diff_ms > (3600 * 1000)) { + strm->ts_last = 0; + return; + } + if (diff_ms > (int)strm->rtp_timeout_ms) { info("stream: no %s RTP packets received for" -- cgit v1.2.3