Ensure that unset capture timestamp wouldn't cause incorrect SR rtp timestamps
If for some reason capture timestamp is unset, the default value of 0 would be
passed to RtcpSender. This will cause rtp timestamps to grow at double the rate
in Sender Reports because it has time since the last frame capture as a term.
Bug: none
Change-Id: I2fe09dabef6b0957fb504deaa06393dedc4a9e70
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/162481
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30105}
diff --git a/modules/rtp_rtcp/source/rtcp_sender.cc b/modules/rtp_rtcp/source/rtcp_sender.cc
index 0f119ef..f06d429 100644
--- a/modules/rtp_rtcp/source/rtcp_sender.cc
+++ b/modules/rtp_rtcp/source/rtcp_sender.cc
@@ -318,7 +318,7 @@
last_payload_type_ = payload_type;
}
last_rtp_timestamp_ = rtp_timestamp;
- if (capture_time_ms < 0) {
+ if (capture_time_ms <= 0) {
// We don't currently get a capture time from VoiceEngine.
last_frame_capture_time_ms_ = clock_->TimeInMilliseconds();
} else {