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

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

Issue 2868723003: Break backwards traversal loop if we have looped around all packet in the PacketBuffer for H264 fra… (Closed)
Patch Set: Added comment. Created 3 years, 7 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
« no previous file with comments | « webrtc/modules/video_coding/packet_buffer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/video_coding/video_packet_buffer_unittest.cc
diff --git a/webrtc/modules/video_coding/video_packet_buffer_unittest.cc b/webrtc/modules/video_coding/video_packet_buffer_unittest.cc
index 0af60b337f0075709cf1c507f5ce3bed40030cfe..86d54ebafe84c2251a0fc9a18513e4a040327f22 100644
--- a/webrtc/modules/video_coding/video_packet_buffer_unittest.cc
+++ b/webrtc/modules/video_coding/video_packet_buffer_unittest.cc
@@ -477,5 +477,29 @@ TEST_F(TestPacketBuffer, ContinuousSeqNumDoubleMarkerBit) {
EXPECT_EQ(0UL, frames_from_callback_.size());
}
+TEST_F(TestPacketBuffer, OneH264FrameFillBuffer) {
+ VCMPacket packet;
+ packet.seqNum = 0;
+ packet.codec = kVideoCodecH264;
+ packet.dataPtr = nullptr;
+ packet.sizeBytes = 0;
+ packet.is_first_packet_in_frame = true;
+ packet.markerBit = false;
+ packet_buffer_->InsertPacket(&packet);
+
+ packet.is_first_packet_in_frame = false;
+ for (int i = 1; i < kStartSize - 1; ++i) {
+ packet.seqNum = i;
+ packet_buffer_->InsertPacket(&packet);
+ }
+
+ packet.seqNum = kStartSize - 1;
+ packet.markerBit = true;
+ packet_buffer_->InsertPacket(&packet);
+
+ EXPECT_EQ(1UL, frames_from_callback_.size());
+ CheckFrame(0);
+}
+
} // namespace video_coding
} // namespace webrtc
« no previous file with comments | « webrtc/modules/video_coding/packet_buffer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698