Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1187)

Unified Diff: webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback.cc

Issue 2122863002: TransportFeedback must be able to start with dropped packets. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Nit Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback.cc
diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback.cc b/webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback.cc
index 5cdaa3aaa470989ed3a030d91211a0245c22d591..356263e96f1a4560e60c50fca38777218abed174 100644
--- a/webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback.cc
@@ -317,7 +317,11 @@ void TransportFeedback::WithBase(uint16_t base_sequence,
RTC_DCHECK_EQ(-1, base_seq_);
RTC_DCHECK_NE(-1, ref_timestamp_us);
base_seq_ = base_sequence;
- last_seq_ = base_sequence;
+ // last_seq_ is the sequence number of the last packed added _before_ a call
+ // to WithReceivedPacket(). Since the first sequence to be added is
+ // base_sequence, we need this to be one lower in order for potential missing
+ // packets to be populated properly.
+ last_seq_ = base_sequence - 1;
base_time_ = ref_timestamp_us / kBaseScaleFactor;
last_timestamp_ = base_time_ * kBaseScaleFactor;
}

Powered by Google App Engine
This is Rietveld 408576698