Check if packet in PacketBuffer was cleared before the frame was fully received.
Bug: none Change-Id: Iaa5702a8da93462ba80f72821f075a6673eeb0e1 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260324 Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org> Commit-Queue: Philip Eliasson <philipel@webrtc.org> Cr-Commit-Position: refs/heads/main@{#36694}
This commit is contained in:
@ -291,6 +291,13 @@ TEST_F(PacketBufferTest, ClearSinglePacket) {
|
||||
Insert(seq_num + kMaxSize, kDeltaFrame, kFirst, kLast).buffer_cleared);
|
||||
}
|
||||
|
||||
TEST_F(PacketBufferTest, ClearPacketBeforeFullyReceivedFrame) {
|
||||
Insert(0, kKeyFrame, kFirst, kNotLast);
|
||||
Insert(1, kKeyFrame, kNotFirst, kNotLast);
|
||||
packet_buffer_.ClearTo(0);
|
||||
EXPECT_THAT(Insert(2, kKeyFrame, kNotFirst, kLast).packets, IsEmpty());
|
||||
}
|
||||
|
||||
TEST_F(PacketBufferTest, ClearFullBuffer) {
|
||||
for (int i = 0; i < kMaxSize; ++i)
|
||||
Insert(i, kDeltaFrame, kFirst, kLast);
|
||||
|
||||
Reference in New Issue
Block a user