summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfred E. Heggestad <alfred.heggestad@gmail.com>2017-12-17 15:25:54 +0100
committerAlfred E. Heggestad <alfred.heggestad@gmail.com>2017-12-17 15:25:54 +0100
commit4e1ed6ba6d14d18a278898a59b6b1f5ee25b70f0 (patch)
tree77e99235a1a2b1e03ee7b14e70f2763c27d809e5
parent1cc4a0c6d5032dcbccc0f758fe7820db688927fb (diff)
stream: make rtp-timeout more robust against clock adjustment
-rw-r--r--src/stream.c6
1 files changed, 6 insertions, 0 deletions
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"