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

Unified Diff: webrtc/modules/video_coding/packet_buffer.cc

Issue 2051453002: Padding is now used to check for continuity in the packet sequence. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Use unique_ptr for dummy data. Created 4 years, 6 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/video_coding/packet_buffer.cc
diff --git a/webrtc/modules/video_coding/packet_buffer.cc b/webrtc/modules/video_coding/packet_buffer.cc
index ad0054fa84deba79c231f6e3c4aa8160192ac036..4f2db6c7f3dba2af53cfc4d69302126d3906e8bb 100644
--- a/webrtc/modules/video_coding/packet_buffer.cc
+++ b/webrtc/modules/video_coding/packet_buffer.cc
@@ -66,6 +66,12 @@ bool PacketBuffer::InsertPacket(const VCMPacket& packet) {
if (AheadOf(seq_num, last_seq_num_))
last_seq_num_ = seq_num;
+ // If this is a padding packet, don't insert it.
+ if (packet.sizeBytes == 0) {
+ reference_finder_.PaddingReceived(packet.seqNum);
+ return true;
+ }
+
sequence_buffer_[index].frame_begin = packet.isFirstPacket;
sequence_buffer_[index].frame_end = packet.markerBit;
sequence_buffer_[index].seq_num = packet.seqNum;

Powered by Google App Engine
This is Rietveld 408576698