diff --git a/audio/channel_send.cc b/audio/channel_send.cc index cc8b1f7842..e3d34727f6 100644 --- a/audio/channel_send.cc +++ b/audio/channel_send.cc @@ -333,6 +333,7 @@ int32_t ChannelSend::SendRtpAudio(FrameType frameType, // This call will trigger Transport::SendPacket() from the RTP/RTCP module. if (!_rtpRtcpModule->SendOutgoingData((FrameType&)frameType, payloadType, timeStamp, + // TODO(https://bugs.webrtc.org/9905): // Leaving the time when this frame was // received from the capture device as // undefined for voice for now. diff --git a/modules/rtp_rtcp/source/rtcp_sender.cc b/modules/rtp_rtcp/source/rtcp_sender.cc index 67fdf34d6f..b2aad1e7cb 100644 --- a/modules/rtp_rtcp/source/rtcp_sender.cc +++ b/modules/rtp_rtcp/source/rtcp_sender.cc @@ -258,6 +258,15 @@ void RTCPSender::SetLastRtpTime(uint32_t rtp_timestamp, int64_t capture_time_ms, int8_t payload_type) { rtc::CritScope lock(&critical_section_rtcp_sender_); + // Workaround for https://bugs.webrtc.org/9905 + // Only very first SetLastRtpTime for audio should update + // last_frame_capture_time_ms_ and last_payload_type_. + // This eliminates jitter between last rtp and capture timestamps. + // TODO(https://bugs.webrtc.org/9905): remove once the bug is fixed. + if (capture_time_ms < 0 && last_frame_capture_time_ms_ > 0 && + payload_type != -1 && last_payload_type_ == payload_type) { + return; + } // For compatibility with clients who don't set payload type correctly on all // calls. if (payload_type != -1) {