Fixed bug in PacketBuffer to correctly detect new complete frames after ClearTo has been called.

BUG=webrtc:5514
R=stefan@webrtc.org, terelius@webrtc.org

Review URL: https://codereview.webrtc.org/2527903002 .

Cr-Commit-Position: refs/heads/master@{#15269}
This commit is contained in:
philipel
2016-11-28 16:14:57 +01:00
parent e1a13f8b3c
commit 20dce34578
2 changed files with 17 additions and 10 deletions

View File

@ -425,5 +425,18 @@ TEST_F(TestPacketBuffer, InvalidateFrameByClearing) {
EXPECT_FALSE(frames_from_callback_.begin()->second->GetBitstream(nullptr));
}
TEST_F(TestPacketBuffer, FramesAfterClear) {
Insert(9025, kDeltaFrame, kFirst, kLast);
Insert(9024, kKeyFrame, kFirst, kLast);
packet_buffer_->ClearTo(9025);
Insert(9057, kDeltaFrame, kFirst, kLast);
Insert(9026, kDeltaFrame, kFirst, kLast);
CheckFrame(9024);
CheckFrame(9025);
CheckFrame(9026);
CheckFrame(9057);
}
} // namespace video_coding
} // namespace webrtc