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

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

Issue 2830723002: Check if the order of frames becomes ambiguous by inserting a new frame, and if so, clear the Frame… (Closed)
Patch Set: Additional saftey check. Created 3 years, 8 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/frame_buffer2.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/frame_buffer2_unittest.cc
diff --git a/webrtc/modules/video_coding/frame_buffer2_unittest.cc b/webrtc/modules/video_coding/frame_buffer2_unittest.cc
index b67d99376fd6a9dcf6d5db1c3bb5c52548eb1e1b..04ce5595a553519b2ad835db52e1da8820b931e5 100644
--- a/webrtc/modules/video_coding/frame_buffer2_unittest.cc
+++ b/webrtc/modules/video_coding/frame_buffer2_unittest.cc
@@ -497,5 +497,24 @@ TEST_F(TestFrameBuffer2, StatsCallback) {
CheckFrame(0, pid, 0);
}
+TEST_F(TestFrameBuffer2, ForwardJumps) {
+ EXPECT_EQ(5453, InsertFrame(5453, 0, 1, false));
+ ExtractFrame();
+ EXPECT_EQ(5454, InsertFrame(5454, 0, 1, false, 5453));
+ ExtractFrame();
+ EXPECT_EQ(15670, InsertFrame(15670, 0, 1, false));
+ ExtractFrame();
+ EXPECT_EQ(29804, InsertFrame(29804, 0, 1, false));
+ ExtractFrame();
+ EXPECT_EQ(29805, InsertFrame(29805, 0, 1, false, 29804));
+ ExtractFrame();
+ EXPECT_EQ(29806, InsertFrame(29806, 0, 1, false, 29805));
+ ExtractFrame();
+ EXPECT_EQ(33819, InsertFrame(33819, 0, 1, false));
+ ExtractFrame();
+ EXPECT_EQ(41248, InsertFrame(41248, 0, 1, false));
+ ExtractFrame();
+}
+
} // namespace video_coding
} // namespace webrtc
« no previous file with comments | « webrtc/modules/video_coding/frame_buffer2.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698