Avoid creating frames with packets of different timestamps.

Bug: None
Change-Id: Ieca71f844d546c2e97b95131153913f138842acd
Reviewed-on: https://webrtc-review.googlesource.com/c/116680
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26176}
diff --git a/modules/video_coding/video_packet_buffer_unittest.cc b/modules/video_coding/video_packet_buffer_unittest.cc
index ee890dd..c546d72 100644
--- a/modules/video_coding/video_packet_buffer_unittest.cc
+++ b/modules/video_coding/video_packet_buffer_unittest.cc
@@ -706,6 +706,13 @@
   CheckFrame(9057);
 }
 
+TEST_F(TestPacketBuffer, SameFrameDifferentTimestamps) {
+  Insert(0, kKeyFrame, kFirst, kNotLast, 0, nullptr, 1000);
+  Insert(1, kKeyFrame, kNotFirst, kLast, 0, nullptr, 1001);
+
+  ASSERT_EQ(0UL, frames_from_callback_.size());
+}
+
 TEST_F(TestPacketBuffer, DontLeakPayloadData) {
   // NOTE! Any eventual leak is suppose to be detected by valgrind
   //       or any other similar tool.