From f4a361800000f269cc6b52614698e97f90970ad0 Mon Sep 17 00:00:00 2001 From: Raja Subramanian Date: Mon, 23 Oct 2023 23:00:03 +0530 Subject: [PATCH] Log error on 0 time stamp. (#2174) Need backtrace for source of it. Also, do not reset start if 0, that is incorrect. --- pkg/sfu/buffer/rtpstats_sender.go | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pkg/sfu/buffer/rtpstats_sender.go b/pkg/sfu/buffer/rtpstats_sender.go index 59e01a83..8efb6cef 100644 --- a/pkg/sfu/buffer/rtpstats_sender.go +++ b/pkg/sfu/buffer/rtpstats_sender.go @@ -394,7 +394,18 @@ func (r *RTPStatsSender) Update( "tsBefore", r.extStartTS, "tsAfter", extTimestamp, ) - r.extStartTS = extTimestamp + if extTimestamp == 0 { // TODO-REMOVE-AFTER-DEBUG + r.logger.Errorw( + "invalid start timestamp", nil, + "snBefore", r.extStartSN, + "snAfter", extSequenceNumber, + "tsBefore", r.extStartTS, + "tsAfter", extTimestamp, + ) + } + if extTimestamp != 0 { + r.extStartTS = extTimestamp + } } if extTimestamp > r.extHighestTS {