From d673b0fa5d3fc319a4f41625db89c07e8a21794f Mon Sep 17 00:00:00 2001 From: Danil Chapovalov Date: Wed, 27 Jan 2016 12:54:37 +0100 Subject: [PATCH] [rtp_rtcp] Fix potentional time difference between rtp and rtcp packets. SetRtpState function was updating only rtp_sender start timestamp. Now it updates both rtp_sender and rtcp_sender start timestamps. BUG=webrtc:5433 R=stefan@webrtc.org Review URL: https://codereview.webrtc.org/1628323003 . Cr-Commit-Position: refs/heads/master@{#11393} --- webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc | 1 + webrtc/modules/rtp_rtcp/source/rtp_sender.cc | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc b/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc index 33e23ec01a..09be51811f 100644 --- a/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc +++ b/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc @@ -291,6 +291,7 @@ void ModuleRtpRtcpImpl::SetSequenceNumber(const uint16_t seq_num) { bool ModuleRtpRtcpImpl::SetRtpStateForSsrc(uint32_t ssrc, const RtpState& rtp_state) { if (rtp_sender_.SSRC() == ssrc) { + SetStartTimestamp(rtp_state.start_timestamp); rtp_sender_.SetRtpState(rtp_state); return true; } diff --git a/webrtc/modules/rtp_rtcp/source/rtp_sender.cc b/webrtc/modules/rtp_rtcp/source/rtp_sender.cc index bd9314d5d7..f2d45eb4c8 100644 --- a/webrtc/modules/rtp_rtcp/source/rtp_sender.cc +++ b/webrtc/modules/rtp_rtcp/source/rtp_sender.cc @@ -1872,7 +1872,6 @@ uint32_t RTPSender::BitrateSent() const { } void RTPSender::SetRtpState(const RtpState& rtp_state) { - SetStartTimestamp(rtp_state.start_timestamp, true); CriticalSectionScoped lock(send_critsect_.get()); sequence_number_ = rtp_state.sequence_number; sequence_number_forced_ = true;