Chromium Code Reviews| 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..9ed3dd13862c438ddb493b851b4d1ac8d8105c64 100644 |
| --- a/webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback.cc |
| +++ b/webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback.cc |
| @@ -72,6 +72,7 @@ TransportFeedback::StatusSymbol DecodeSymbol(uint8_t value) { |
| } |
| } |
| + |
|
stefan-webrtc
2016/07/05 09:20:23
Remove this empty line
sprang_webrtc
2016/07/05 09:45:07
Done.
|
| TransportFeedback::TransportFeedback() |
| : packet_sender_ssrc_(0), |
| media_source_ssrc_(0), |
| @@ -317,7 +318,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; |
| } |