diff --git a/logging/rtc_event_log/rtc_event_log_parser.cc b/logging/rtc_event_log/rtc_event_log_parser.cc index 32dd92d820..2c49b8d530 100644 --- a/logging/rtc_event_log/rtc_event_log_parser.cc +++ b/logging/rtc_event_log/rtc_event_log_parser.cc @@ -1891,12 +1891,18 @@ std::vector ParsedRtcEventLog::GetPacketInfos( auto rtp_handler = [&](const LoggedRtpPacket& rtp) { advance_time(Timestamp::ms(rtp.log_time_ms())); MediaStreamInfo* stream = &streams[rtp.header.ssrc]; - uint64_t capture_ticks = - stream->unwrap_capture_ticks.Unwrap(rtp.header.timestamp); - // TODO(srte): Use logged sample rate when it is added to the format. - Timestamp capture_time = Timestamp::seconds( - capture_ticks / - (stream->media_type == LoggedMediaType::kAudio ? 48000.0 : 90000.0)); + Timestamp capture_time = Timestamp::MinusInfinity(); + if (!stream->rtx) { + // RTX copy the timestamp of the retransmitted packets. This means that + // RTX streams don't have a unique clock offset and frequency, so + // the RTP timstamps can't be unwrapped. + uint64_t capture_ticks = + stream->unwrap_capture_ticks.Unwrap(rtp.header.timestamp); + // TODO(srte): Use logged sample rate when it is added to the format. + capture_time = Timestamp::seconds( + capture_ticks / + (stream->media_type == LoggedMediaType::kAudio ? 48000.0 : 90000.0)); + } LoggedPacketInfo logged(rtp, stream->media_type, stream->rtx, capture_time); logged.overhead = current_overhead; if (rtp.header.extension.hasTransportSequenceNumber) { diff --git a/rtc_base/units/unit_base.h b/rtc_base/units/unit_base.h index 5503a32993..37b60a0bb9 100644 --- a/rtc_base/units/unit_base.h +++ b/rtc_base/units/unit_base.h @@ -23,7 +23,7 @@ namespace webrtc { namespace rtc_units_impl { // UnitBase is a base class for implementing custom value types with a specific -// unit. It provides type safety and sommonly useful operations. The undelying +// unit. It provides type safety and commonly useful operations. The underlying // storage is always an int64_t, it's up to the unit implementation to choose // what scale it represents. //