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

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

Issue 2394823002: Skip non-continuous FrameInfos when finding the next frame to return from FrameBuffer::NextFrame. (Closed)
Patch Set: Created 4 years, 2 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/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 7f8ac674400b534a25d743e20825e899306ab74c..ebcbeb0254fe9c33f9cb00ea91e0cb564984f36a 100644
--- a/webrtc/modules/video_coding/frame_buffer2_unittest.cc
+++ b/webrtc/modules/video_coding/frame_buffer2_unittest.cc
@@ -263,6 +263,22 @@ TEST_F(TestFrameBuffer2, ExtractFromEmptyBuffer) {
CheckNoFrame(0);
}
+TEST_F(TestFrameBuffer2, MissingFrame) {
+ uint16_t pid = Rand();
+ uint32_t ts = Rand();
+
+ InsertFrame(pid, 0, ts, false);
+ InsertFrame(pid + 2, 0, ts, false, pid);
+ InsertFrame(pid + 3, 0, ts, false, pid + 1, pid + 2);
+ ExtractFrame();
+ ExtractFrame();
+ ExtractFrame();
+
+ CheckFrame(0, pid, 0);
+ CheckFrame(1, pid + 2, 0);
+ CheckNoFrame(2);
+}
+
TEST_F(TestFrameBuffer2, OneLayerStream) {
uint16_t pid = Rand();
uint32_t ts = Rand();
« webrtc/modules/video_coding/frame_buffer2.cc ('K') | « 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