Move frame_type member from RtpDepacketizer::ParsedPayload to RTPVideoHeader

The latter is also a member of the former. This cleanup is also
a preparation for dropping WebRtcRTPHeader::frameType (or deleting
WebRtcRTPHeader right away), now that it's a video-specific member.


Tbr: kwiberg@webrtc.org # Comment change in modules/include/
Bug: None
Change-Id: I5c1f3f981f0d750713fc9b9b145278150fe32b5d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133024
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27740}
diff --git a/modules/video_coding/decoding_state_unittest.cc b/modules/video_coding/decoding_state_unittest.cc
index 2d7e4a3..1ecb9b2 100644
--- a/modules/video_coding/decoding_state_unittest.cc
+++ b/modules/video_coding/decoding_state_unittest.cc
@@ -37,7 +37,7 @@
   packet.video_header.is_first_packet_in_frame = true;
   packet.timestamp = 1;
   packet.seqNum = 0xffff;
-  packet.frameType = VideoFrameType::kVideoFrameDelta;
+  packet.video_header.frame_type = VideoFrameType::kVideoFrameDelta;
   packet.video_header.codec = kVideoCodecVP8;
   auto& vp8_header =
       packet.video_header.video_type_header.emplace<RTPVideoHeaderVP8>();
@@ -49,12 +49,12 @@
   // Always start with a key frame.
   dec_state.Reset();
   EXPECT_FALSE(dec_state.ContinuousFrame(&frame));
-  packet.frameType = VideoFrameType::kVideoFrameKey;
+  packet.video_header.frame_type = VideoFrameType::kVideoFrameKey;
   EXPECT_LE(0, frame_key.InsertPacket(packet, 0, frame_data));
   EXPECT_TRUE(dec_state.ContinuousFrame(&frame_key));
   dec_state.SetState(&frame);
   frame.Reset();
-  packet.frameType = VideoFrameType::kVideoFrameDelta;
+  packet.video_header.frame_type = VideoFrameType::kVideoFrameDelta;
   // Use pictureId
   packet.video_header.is_first_packet_in_frame = false;
   vp8_header.pictureId = 0x0002;
@@ -170,7 +170,7 @@
   VCMPacket packet;
   packet.timestamp = 1;
   packet.seqNum = 1;
-  packet.frameType = VideoFrameType::kVideoFrameDelta;
+  packet.video_header.frame_type = VideoFrameType::kVideoFrameDelta;
   FrameData frame_data;
   frame_data.rtt_ms = 0;
   frame_data.rolling_average_packets_per_frame = -1;
@@ -185,14 +185,14 @@
   // Now insert empty packet belonging to the same frame.
   packet.timestamp = 1;
   packet.seqNum = 2;
-  packet.frameType = VideoFrameType::kEmptyFrame;
+  packet.video_header.frame_type = VideoFrameType::kEmptyFrame;
   packet.sizeBytes = 0;
   dec_state.UpdateOldPacket(&packet);
   EXPECT_EQ(dec_state.sequence_num(), 2);
   // Now insert delta packet belonging to the same frame.
   packet.timestamp = 1;
   packet.seqNum = 3;
-  packet.frameType = VideoFrameType::kVideoFrameDelta;
+  packet.video_header.frame_type = VideoFrameType::kVideoFrameDelta;
   packet.sizeBytes = 1400;
   dec_state.UpdateOldPacket(&packet);
   EXPECT_EQ(dec_state.sequence_num(), 3);
@@ -200,7 +200,7 @@
   // sequence number.
   packet.timestamp = 0;
   packet.seqNum = 4;
-  packet.frameType = VideoFrameType::kEmptyFrame;
+  packet.video_header.frame_type = VideoFrameType::kEmptyFrame;
   packet.sizeBytes = 0;
   dec_state.UpdateOldPacket(&packet);
   EXPECT_EQ(dec_state.sequence_num(), 3);
@@ -214,7 +214,7 @@
   // tl0PicIdx 0, temporal id 0.
   VCMFrameBuffer frame;
   VCMPacket packet;
-  packet.frameType = VideoFrameType::kVideoFrameDelta;
+  packet.video_header.frame_type = VideoFrameType::kVideoFrameDelta;
   packet.video_header.codec = kVideoCodecVP8;
   packet.timestamp = 0;
   packet.seqNum = 0;
@@ -265,7 +265,7 @@
   // Insert key frame - should update sync value.
   // A key frame is always a base layer.
   frame.Reset();
-  packet.frameType = VideoFrameType::kVideoFrameKey;
+  packet.video_header.frame_type = VideoFrameType::kVideoFrameKey;
   packet.video_header.is_first_packet_in_frame = true;
   packet.timestamp = 5;
   packet.seqNum = 5;
@@ -279,7 +279,7 @@
   // After sync, a continuous PictureId is required
   // (continuous base layer is not enough )
   frame.Reset();
-  packet.frameType = VideoFrameType::kVideoFrameDelta;
+  packet.video_header.frame_type = VideoFrameType::kVideoFrameDelta;
   packet.timestamp = 6;
   packet.seqNum = 6;
   vp8_header.tl0PicIdx = 3;
@@ -289,7 +289,7 @@
   EXPECT_TRUE(dec_state.ContinuousFrame(&frame));
   EXPECT_TRUE(dec_state.full_sync());
   frame.Reset();
-  packet.frameType = VideoFrameType::kVideoFrameDelta;
+  packet.video_header.frame_type = VideoFrameType::kVideoFrameDelta;
   packet.video_header.is_first_packet_in_frame = true;
   packet.timestamp = 8;
   packet.seqNum = 8;
@@ -304,7 +304,7 @@
 
   // Insert a non-ref frame - should update sync value.
   frame.Reset();
-  packet.frameType = VideoFrameType::kVideoFrameDelta;
+  packet.video_header.frame_type = VideoFrameType::kVideoFrameDelta;
   packet.video_header.is_first_packet_in_frame = true;
   packet.timestamp = 9;
   packet.seqNum = 9;
@@ -324,7 +324,7 @@
   // Base layer.
   frame.Reset();
   dec_state.Reset();
-  packet.frameType = VideoFrameType::kVideoFrameDelta;
+  packet.video_header.frame_type = VideoFrameType::kVideoFrameDelta;
   packet.video_header.is_first_packet_in_frame = true;
   packet.markerBit = 1;
   packet.timestamp = 0;
@@ -338,7 +338,7 @@
   EXPECT_TRUE(dec_state.full_sync());
   // Layer 2 - 2 packets (insert one, lose one).
   frame.Reset();
-  packet.frameType = VideoFrameType::kVideoFrameDelta;
+  packet.video_header.frame_type = VideoFrameType::kVideoFrameDelta;
   packet.video_header.is_first_packet_in_frame = true;
   packet.markerBit = 0;
   packet.timestamp = 1;
@@ -351,7 +351,7 @@
   EXPECT_TRUE(dec_state.ContinuousFrame(&frame));
   // Layer 1
   frame.Reset();
-  packet.frameType = VideoFrameType::kVideoFrameDelta;
+  packet.video_header.frame_type = VideoFrameType::kVideoFrameDelta;
   packet.video_header.is_first_packet_in_frame = true;
   packet.markerBit = 1;
   packet.timestamp = 2;
@@ -370,7 +370,7 @@
   VCMFrameBuffer frame;
   VCMPacket packet;
   frame.Reset();
-  packet.frameType = VideoFrameType::kVideoFrameKey;
+  packet.video_header.frame_type = VideoFrameType::kVideoFrameKey;
   packet.video_header.codec = kVideoCodecVP8;
   packet.timestamp = 0;
   packet.seqNum = 0;
@@ -389,7 +389,7 @@
   // Continuous sequence number but discontinuous picture id. This implies a
   // a loss and we have to fall back to only decoding the base layer.
   frame.Reset();
-  packet.frameType = VideoFrameType::kVideoFrameDelta;
+  packet.video_header.frame_type = VideoFrameType::kVideoFrameDelta;
   packet.timestamp += 3000;
   ++packet.seqNum;
   vp8_header.temporalIdx = 1;
@@ -425,7 +425,7 @@
   VCMDecodingState dec_state;
   VCMFrameBuffer frame;
   VCMPacket packet;
-  packet.frameType = VideoFrameType::kVideoFrameDelta;
+  packet.video_header.frame_type = VideoFrameType::kVideoFrameDelta;
   packet.video_header.codec = kVideoCodecVP8;
   packet.timestamp = 0;
   packet.seqNum = 0;
@@ -478,7 +478,7 @@
   frame_data.rolling_average_packets_per_frame = -1;
 
   // Key frame as first frame
-  packet.frameType = VideoFrameType::kVideoFrameKey;
+  packet.video_header.frame_type = VideoFrameType::kVideoFrameKey;
   EXPECT_LE(0, frame.InsertPacket(packet, 0, frame_data));
   EXPECT_TRUE(dec_state.ContinuousFrame(&frame));
   dec_state.SetState(&frame);
@@ -492,7 +492,7 @@
 
   // Ref to 11, continuous
   frame.Reset();
-  packet.frameType = VideoFrameType::kVideoFrameDelta;
+  packet.video_header.frame_type = VideoFrameType::kVideoFrameDelta;
   vp9_hdr.picture_id = 12;
   vp9_hdr.num_ref_pics = 1;
   vp9_hdr.pid_diff[0] = 1;
@@ -522,14 +522,14 @@
   frame_data.rolling_average_packets_per_frame = -1;
 
   // Key frame as first frame
-  packet.frameType = VideoFrameType::kVideoFrameKey;
+  packet.video_header.frame_type = VideoFrameType::kVideoFrameKey;
   EXPECT_LE(0, frame.InsertPacket(packet, 0, frame_data));
   EXPECT_TRUE(dec_state.ContinuousFrame(&frame));
   dec_state.SetState(&frame);
 
   // Ref to 10, continuous
   frame.Reset();
-  packet.frameType = VideoFrameType::kVideoFrameDelta;
+  packet.video_header.frame_type = VideoFrameType::kVideoFrameDelta;
   vp9_hdr.picture_id = 15;
   vp9_hdr.num_ref_pics = 1;
   vp9_hdr.pid_diff[0] = 5;
@@ -578,23 +578,23 @@
   frame_data.rolling_average_packets_per_frame = -1;
 
   // Key frame as first frame
-  packet.frameType = VideoFrameType::kVideoFrameKey;
+  packet.video_header.frame_type = VideoFrameType::kVideoFrameKey;
   EXPECT_LE(0, frame.InsertPacket(packet, 0, frame_data));
   EXPECT_TRUE(dec_state.ContinuousFrame(&frame));
 
   // Delta frame as first frame
   frame.Reset();
-  packet.frameType = VideoFrameType::kVideoFrameDelta;
+  packet.video_header.frame_type = VideoFrameType::kVideoFrameDelta;
   EXPECT_LE(0, frame.InsertPacket(packet, 0, frame_data));
   EXPECT_FALSE(dec_state.ContinuousFrame(&frame));
 
   // Key frame then delta frame
   frame.Reset();
-  packet.frameType = VideoFrameType::kVideoFrameKey;
+  packet.video_header.frame_type = VideoFrameType::kVideoFrameKey;
   EXPECT_LE(0, frame.InsertPacket(packet, 0, frame_data));
   dec_state.SetState(&frame);
   frame.Reset();
-  packet.frameType = VideoFrameType::kVideoFrameDelta;
+  packet.video_header.frame_type = VideoFrameType::kVideoFrameDelta;
   vp9_hdr.num_ref_pics = 1;
   vp9_hdr.picture_id = 15;
   vp9_hdr.pid_diff[0] = 5;
@@ -638,7 +638,7 @@
 
   // Key Frame, continuous
   frame.Reset();
-  packet.frameType = VideoFrameType::kVideoFrameKey;
+  packet.video_header.frame_type = VideoFrameType::kVideoFrameKey;
   vp9_hdr.picture_id = VCMDecodingState::kFrameDecodedLength - 2;
   vp9_hdr.num_ref_pics = 0;
   EXPECT_LE(0, frame.InsertPacket(packet, 0, frame_data));
@@ -647,7 +647,7 @@
 
   // Frame at last index, ref to KF, continuous
   frame.Reset();
-  packet.frameType = VideoFrameType::kVideoFrameDelta;
+  packet.video_header.frame_type = VideoFrameType::kVideoFrameDelta;
   vp9_hdr.picture_id = VCMDecodingState::kFrameDecodedLength - 1;
   vp9_hdr.num_ref_pics = 1;
   vp9_hdr.pid_diff[0] = 1;
@@ -683,7 +683,7 @@
 
   // Key frame, continuous
   frame.Reset();
-  packet.frameType = VideoFrameType::kVideoFrameKey;
+  packet.video_header.frame_type = VideoFrameType::kVideoFrameKey;
   vp9_hdr.picture_id = 25;
   vp9_hdr.num_ref_pics = 0;
   EXPECT_LE(0, frame.InsertPacket(packet, 0, frame_data));
@@ -692,7 +692,7 @@
 
   // Ref to KF, continuous
   frame.Reset();
-  packet.frameType = VideoFrameType::kVideoFrameDelta;
+  packet.video_header.frame_type = VideoFrameType::kVideoFrameDelta;
   vp9_hdr.picture_id = 26;
   vp9_hdr.num_ref_pics = 1;
   vp9_hdr.pid_diff[0] = 1;
diff --git a/modules/video_coding/frame_buffer.cc b/modules/video_coding/frame_buffer.cc
index 2c9aa23..9bd6c8a 100644
--- a/modules/video_coding/frame_buffer.cc
+++ b/modules/video_coding/frame_buffer.cc
@@ -94,7 +94,7 @@
     // We only take the ntp timestamp of the first packet of a frame.
     ntp_time_ms_ = packet.ntp_time_ms_;
     _codec = packet.codec();
-    if (packet.frameType != VideoFrameType::kEmptyFrame) {
+    if (packet.video_header.frame_type != VideoFrameType::kEmptyFrame) {
       // first media packet
       SetState(kStateIncomplete);
     }
diff --git a/modules/video_coding/frame_object.cc b/modules/video_coding/frame_object.cc
index 6f56fe0..ccac4bb 100644
--- a/modules/video_coding/frame_object.cc
+++ b/modules/video_coding/frame_object.cc
@@ -38,7 +38,7 @@
   RTC_CHECK(first_packet);
 
   // EncodedFrame members
-  frame_type_ = first_packet->frameType;
+  frame_type_ = first_packet->video_header.frame_type;
   codec_type_ = first_packet->codec();
 
   // TODO(philipel): Remove when encoded image is replaced by EncodedFrame.
@@ -48,7 +48,7 @@
   _payloadType = first_packet->payloadType;
   SetTimestamp(first_packet->timestamp);
   ntp_time_ms_ = first_packet->ntp_time_ms_;
-  _frameType = first_packet->frameType;
+  _frameType = first_packet->video_header.frame_type;
 
   // Setting frame's playout delays to the same values
   // as of the first packet's.
diff --git a/modules/video_coding/jitter_buffer.cc b/modules/video_coding/jitter_buffer.cc
index 51e828f..3d3b967 100644
--- a/modules/video_coding/jitter_buffer.cc
+++ b/modules/video_coding/jitter_buffer.cc
@@ -413,7 +413,7 @@
 
   // Empty packets may bias the jitter estimate (lacking size component),
   // therefore don't let empty packet trigger the following updates:
-  if (packet.frameType != VideoFrameType::kEmptyFrame) {
+  if (packet.video_header.frame_type != VideoFrameType::kEmptyFrame) {
     if (waiting_for_completion_.timestamp == packet.timestamp) {
       // This can get bad if we have a lot of duplicate packets,
       // we will then count some packet multiple times.
@@ -446,7 +446,7 @@
         frame->IncrementNackCount();
       }
       if (!UpdateNackList(packet.seqNum) &&
-          packet.frameType != VideoFrameType::kVideoFrameKey) {
+          packet.video_header.frame_type != VideoFrameType::kVideoFrameKey) {
         buffer_state = kFlushIndicator;
       }
 
diff --git a/modules/video_coding/jitter_buffer_unittest.cc b/modules/video_coding/jitter_buffer_unittest.cc
index 221701b..53eba63 100644
--- a/modules/video_coding/jitter_buffer_unittest.cc
+++ b/modules/video_coding/jitter_buffer_unittest.cc
@@ -65,8 +65,8 @@
     rtp_header.markerBit = true;
     video_header.codec = kVideoCodecGeneric;
     video_header.is_first_packet_in_frame = true;
+    video_header.frame_type = VideoFrameType::kVideoFrameDelta;
     packet_.reset(new VCMPacket(data_, size_, rtp_header, video_header,
-                                VideoFrameType::kVideoFrameDelta,
                                 /*ntp_time_ms=*/0));
   }
 
@@ -241,7 +241,7 @@
 
 TEST_F(TestBasicJitterBuffer, SinglePacketFrame) {
   // Always start with a complete key frame when not allowing errors.
-  packet_->frameType = VideoFrameType::kVideoFrameKey;
+  packet_->video_header.frame_type = VideoFrameType::kVideoFrameKey;
   packet_->video_header.is_first_packet_in_frame = true;
   packet_->markerBit = true;
   packet_->timestamp += 123 * 90;
@@ -257,7 +257,7 @@
 }
 
 TEST_F(TestBasicJitterBuffer, DualPacketFrame) {
-  packet_->frameType = VideoFrameType::kVideoFrameKey;
+  packet_->video_header.frame_type = VideoFrameType::kVideoFrameKey;
   packet_->video_header.is_first_packet_in_frame = true;
   packet_->markerBit = false;
 
@@ -284,7 +284,7 @@
 }
 
 TEST_F(TestBasicJitterBuffer, 100PacketKeyFrame) {
-  packet_->frameType = VideoFrameType::kVideoFrameKey;
+  packet_->video_header.frame_type = VideoFrameType::kVideoFrameKey;
   packet_->video_header.is_first_packet_in_frame = true;
   packet_->markerBit = false;
 
@@ -328,7 +328,7 @@
 
 TEST_F(TestBasicJitterBuffer, 100PacketDeltaFrame) {
   // Always start with a complete key frame.
-  packet_->frameType = VideoFrameType::kVideoFrameKey;
+  packet_->video_header.frame_type = VideoFrameType::kVideoFrameKey;
   packet_->video_header.is_first_packet_in_frame = true;
   packet_->markerBit = true;
 
@@ -342,7 +342,7 @@
   ++seq_num_;
   packet_->seqNum = seq_num_;
   packet_->markerBit = false;
-  packet_->frameType = VideoFrameType::kVideoFrameDelta;
+  packet_->video_header.frame_type = VideoFrameType::kVideoFrameDelta;
   packet_->timestamp += 33 * 90;
 
   EXPECT_EQ(kIncomplete,
@@ -385,7 +385,7 @@
 TEST_F(TestBasicJitterBuffer, PacketReorderingReverseOrder) {
   // Insert the "first" packet last.
   seq_num_ += 100;
-  packet_->frameType = VideoFrameType::kVideoFrameKey;
+  packet_->video_header.frame_type = VideoFrameType::kVideoFrameKey;
   packet_->video_header.is_first_packet_in_frame = false;
   packet_->markerBit = true;
   packet_->seqNum = seq_num_;
@@ -430,7 +430,7 @@
 }
 
 TEST_F(TestBasicJitterBuffer, FrameReordering2Frames2PacketsEach) {
-  packet_->frameType = VideoFrameType::kVideoFrameDelta;
+  packet_->video_header.frame_type = VideoFrameType::kVideoFrameDelta;
   packet_->video_header.is_first_packet_in_frame = true;
   packet_->markerBit = false;
 
@@ -456,7 +456,7 @@
 
   seq_num_ -= 3;
   timestamp_ -= 33 * 90;
-  packet_->frameType = VideoFrameType::kVideoFrameKey;
+  packet_->video_header.frame_type = VideoFrameType::kVideoFrameKey;
   packet_->video_header.is_first_packet_in_frame = true;
   packet_->markerBit = false;
   packet_->seqNum = seq_num_;
@@ -491,7 +491,7 @@
 
 TEST_F(TestBasicJitterBuffer, TestReorderingWithPadding) {
   jitter_buffer_->SetNackSettings(kMaxNumberOfFrames, kMaxNumberOfFrames, 0);
-  packet_->frameType = VideoFrameType::kVideoFrameKey;
+  packet_->video_header.frame_type = VideoFrameType::kVideoFrameKey;
   packet_->video_header.is_first_packet_in_frame = true;
   packet_->markerBit = true;
 
@@ -505,7 +505,7 @@
 
   // Now send in a complete delta frame (Frame C), but with a sequence number
   // gap. No pic index either, so no temporal scalability cheating :)
-  packet_->frameType = VideoFrameType::kVideoFrameDelta;
+  packet_->video_header.frame_type = VideoFrameType::kVideoFrameDelta;
   // Leave a gap of 2 sequence numbers and two frames.
   packet_->seqNum = seq_num_ + 3;
   packet_->timestamp = timestamp_ + (66 * 90);
@@ -540,8 +540,9 @@
   rtp_header.timestamp = timestamp_ + (33 * 90);
   rtp_header.markerBit = false;
   video_header.codec = kVideoCodecGeneric;
+  video_header.frame_type = VideoFrameType::kEmptyFrame;
   VCMPacket empty_packet(data_, 0, rtp_header, video_header,
-                         VideoFrameType::kEmptyFrame, /*ntp_time_ms=*/0);
+                         /*ntp_time_ms=*/0);
   EXPECT_EQ(kOldPacket,
             jitter_buffer_->InsertPacket(empty_packet, &retransmitted));
   empty_packet.seqNum += 1;
@@ -555,7 +556,7 @@
 }
 
 TEST_F(TestBasicJitterBuffer, DuplicatePackets) {
-  packet_->frameType = VideoFrameType::kVideoFrameKey;
+  packet_->video_header.frame_type = VideoFrameType::kVideoFrameKey;
   packet_->video_header.is_first_packet_in_frame = true;
   packet_->markerBit = false;
   packet_->seqNum = seq_num_;
@@ -598,7 +599,7 @@
 }
 
 TEST_F(TestBasicJitterBuffer, DuplicatePreviousDeltaFramePacket) {
-  packet_->frameType = VideoFrameType::kVideoFrameKey;
+  packet_->video_header.frame_type = VideoFrameType::kVideoFrameKey;
   packet_->video_header.is_first_packet_in_frame = true;
   packet_->markerBit = true;
   packet_->seqNum = seq_num_;
@@ -621,7 +622,7 @@
   for (uint16_t i = 1; i <= 3; ++i) {
     packet_->seqNum = seq_num_ + i;
     packet_->timestamp = timestamp_ + (i * 33) * 90;
-    packet_->frameType = VideoFrameType::kVideoFrameDelta;
+    packet_->video_header.frame_type = VideoFrameType::kVideoFrameDelta;
     EXPECT_EQ(kCompleteSession,
               jitter_buffer_->InsertPacket(*packet_, &retransmitted));
     EXPECT_EQ(i + 1, jitter_buffer_->num_packets());
@@ -674,7 +675,7 @@
 
   packet_->seqNum = 65485;
   packet_->timestamp = 1000;
-  packet_->frameType = VideoFrameType::kVideoFrameKey;
+  packet_->video_header.frame_type = VideoFrameType::kVideoFrameKey;
   vp9_header.picture_id = 5;
   vp9_header.tl0_pic_idx = 200;
   vp9_header.temporal_idx = 0;
@@ -686,7 +687,7 @@
   // Insert next temporal layer 0.
   packet_->seqNum = 65489;
   packet_->timestamp = 13000;
-  packet_->frameType = VideoFrameType::kVideoFrameDelta;
+  packet_->video_header.frame_type = VideoFrameType::kVideoFrameDelta;
   vp9_header.picture_id = 9;
   vp9_header.tl0_pic_idx = 201;
   vp9_header.temporal_idx = 0;
@@ -729,7 +730,7 @@
 
   packet_->seqNum = 65486;
   packet_->timestamp = 6000;
-  packet_->frameType = VideoFrameType::kVideoFrameDelta;
+  packet_->video_header.frame_type = VideoFrameType::kVideoFrameDelta;
   vp9_header.picture_id = 6;
   vp9_header.temporal_idx = 2;
   vp9_header.temporal_up_switch = true;
@@ -737,7 +738,7 @@
 
   packet_->seqNum = 65487;
   packet_->timestamp = 9000;
-  packet_->frameType = VideoFrameType::kVideoFrameDelta;
+  packet_->video_header.frame_type = VideoFrameType::kVideoFrameDelta;
   vp9_header.picture_id = 7;
   vp9_header.temporal_idx = 1;
   vp9_header.temporal_up_switch = true;
@@ -746,7 +747,7 @@
   // Insert first frame with SS data.
   packet_->seqNum = 65485;
   packet_->timestamp = 3000;
-  packet_->frameType = VideoFrameType::kVideoFrameKey;
+  packet_->video_header.frame_type = VideoFrameType::kVideoFrameKey;
   packet_->video_header.width = 352;
   packet_->video_header.height = 288;
   vp9_header.picture_id = 5;
@@ -806,7 +807,7 @@
   packet_->markerBit = false;
   packet_->seqNum = 65486;
   packet_->timestamp = 6000;
-  packet_->frameType = VideoFrameType::kVideoFrameDelta;
+  packet_->video_header.frame_type = VideoFrameType::kVideoFrameDelta;
   vp9_header.spatial_idx = 0;
   vp9_header.picture_id = 6;
   vp9_header.temporal_idx = 1;
@@ -816,7 +817,7 @@
   packet_->video_header.is_first_packet_in_frame = false;
   packet_->markerBit = true;
   packet_->seqNum = 65487;
-  packet_->frameType = VideoFrameType::kVideoFrameDelta;
+  packet_->video_header.frame_type = VideoFrameType::kVideoFrameDelta;
   vp9_header.spatial_idx = 1;
   vp9_header.picture_id = 6;
   vp9_header.temporal_idx = 1;
@@ -827,7 +828,7 @@
   packet_->markerBit = true;
   packet_->seqNum = 65485;
   packet_->timestamp = 3000;
-  packet_->frameType = VideoFrameType::kVideoFrameKey;
+  packet_->video_header.frame_type = VideoFrameType::kVideoFrameKey;
   vp9_header.spatial_idx = 1;
   vp9_header.picture_id = 5;
   vp9_header.temporal_idx = 0;
@@ -838,7 +839,7 @@
   packet_->video_header.is_first_packet_in_frame = true;
   packet_->markerBit = false;
   packet_->seqNum = 65484;
-  packet_->frameType = VideoFrameType::kVideoFrameKey;
+  packet_->video_header.frame_type = VideoFrameType::kVideoFrameKey;
   packet_->video_header.width = 352;
   packet_->video_header.height = 288;
   vp9_header.spatial_idx = 0;
@@ -867,7 +868,7 @@
 }
 
 TEST_F(TestBasicJitterBuffer, H264InsertStartCode) {
-  packet_->frameType = VideoFrameType::kVideoFrameKey;
+  packet_->video_header.frame_type = VideoFrameType::kVideoFrameKey;
   packet_->video_header.is_first_packet_in_frame = true;
   packet_->markerBit = false;
   packet_->seqNum = seq_num_;
@@ -901,7 +902,7 @@
   auto& h264_header =
       packet_->video_header.video_type_header.emplace<RTPVideoHeaderH264>();
   packet_->timestamp = timestamp_;
-  packet_->frameType = VideoFrameType::kVideoFrameKey;
+  packet_->video_header.frame_type = VideoFrameType::kVideoFrameKey;
   packet_->video_header.is_first_packet_in_frame = true;
   packet_->markerBit = true;
   packet_->video_header.codec = kVideoCodecH264;
@@ -920,7 +921,7 @@
   packet_->timestamp = timestamp_;
   ++seq_num_;
   packet_->seqNum = seq_num_;
-  packet_->frameType = VideoFrameType::kVideoFrameKey;
+  packet_->video_header.frame_type = VideoFrameType::kVideoFrameKey;
   packet_->video_header.is_first_packet_in_frame = true;
   packet_->markerBit = false;
   packet_->video_header.codec = kVideoCodecH264;
@@ -938,7 +939,7 @@
 
   ++seq_num_;
   packet_->seqNum = seq_num_;
-  packet_->frameType = VideoFrameType::kVideoFrameKey;
+  packet_->video_header.frame_type = VideoFrameType::kVideoFrameKey;
   packet_->video_header.is_first_packet_in_frame = false;
   packet_->markerBit = true;
   packet_->video_header.codec = kVideoCodecH264;
@@ -959,7 +960,7 @@
   packet_->timestamp = timestamp_;
   ++seq_num_;
   packet_->seqNum = seq_num_;
-  packet_->frameType = VideoFrameType::kVideoFrameDelta;
+  packet_->video_header.frame_type = VideoFrameType::kVideoFrameDelta;
   packet_->video_header.is_first_packet_in_frame = true;
   packet_->markerBit = true;
   packet_->video_header.codec = kVideoCodecH264;
@@ -978,7 +979,7 @@
 
 TEST_F(TestBasicJitterBuffer, DeltaFrame100PacketsWithSeqNumWrap) {
   seq_num_ = 0xfff0;
-  packet_->frameType = VideoFrameType::kVideoFrameKey;
+  packet_->video_header.frame_type = VideoFrameType::kVideoFrameKey;
   packet_->video_header.is_first_packet_in_frame = true;
   packet_->markerBit = false;
   packet_->seqNum = seq_num_;
@@ -1028,7 +1029,7 @@
 TEST_F(TestBasicJitterBuffer, PacketReorderingReverseWithNegSeqNumWrap) {
   // Insert "first" packet last seqnum.
   seq_num_ = 10;
-  packet_->frameType = VideoFrameType::kVideoFrameKey;
+  packet_->video_header.frame_type = VideoFrameType::kVideoFrameKey;
   packet_->video_header.is_first_packet_in_frame = false;
   packet_->markerBit = true;
   packet_->seqNum = seq_num_;
@@ -1081,7 +1082,7 @@
   //  t = 3000     t = 2000
   seq_num_ = 2;
   timestamp_ = 3000;
-  packet_->frameType = VideoFrameType::kVideoFrameKey;
+  packet_->video_header.frame_type = VideoFrameType::kVideoFrameKey;
   packet_->video_header.is_first_packet_in_frame = true;
   packet_->markerBit = true;
   packet_->timestamp = timestamp_;
@@ -1099,7 +1100,7 @@
 
   seq_num_--;
   timestamp_ = 2000;
-  packet_->frameType = VideoFrameType::kVideoFrameDelta;
+  packet_->video_header.frame_type = VideoFrameType::kVideoFrameDelta;
   packet_->video_header.is_first_packet_in_frame = true;
   packet_->markerBit = true;
   packet_->seqNum = seq_num_;
@@ -1116,7 +1117,7 @@
 
   seq_num_ = 2;
   timestamp_ = 3000;
-  packet_->frameType = VideoFrameType::kVideoFrameKey;
+  packet_->video_header.frame_type = VideoFrameType::kVideoFrameKey;
   packet_->video_header.is_first_packet_in_frame = true;
   packet_->markerBit = true;
   packet_->seqNum = seq_num_;
@@ -1137,7 +1138,7 @@
 
   seq_num_--;
   timestamp_ = 0xffffff00;
-  packet_->frameType = VideoFrameType::kVideoFrameDelta;
+  packet_->video_header.frame_type = VideoFrameType::kVideoFrameDelta;
   packet_->video_header.is_first_packet_in_frame = true;
   packet_->markerBit = true;
   packet_->seqNum = seq_num_;
@@ -1154,7 +1155,7 @@
   //  t = 0xffffff00        t = 33*90
 
   timestamp_ = 0xffffff00;
-  packet_->frameType = VideoFrameType::kVideoFrameKey;
+  packet_->video_header.frame_type = VideoFrameType::kVideoFrameKey;
   packet_->video_header.is_first_packet_in_frame = true;
   packet_->markerBit = false;
   packet_->seqNum = seq_num_;
@@ -1181,7 +1182,7 @@
 
   seq_num_++;
   timestamp_ += 33 * 90;
-  packet_->frameType = VideoFrameType::kVideoFrameDelta;
+  packet_->video_header.frame_type = VideoFrameType::kVideoFrameDelta;
   packet_->video_header.is_first_packet_in_frame = true;
   packet_->markerBit = false;
   packet_->seqNum = seq_num_;
@@ -1214,7 +1215,7 @@
   // t = 0xffffff00    t = 2700
 
   timestamp_ = 0xffffff00;
-  packet_->frameType = VideoFrameType::kVideoFrameKey;
+  packet_->video_header.frame_type = VideoFrameType::kVideoFrameKey;
   packet_->video_header.is_first_packet_in_frame = true;
   packet_->markerBit = true;
   packet_->timestamp = timestamp_;
@@ -1227,7 +1228,7 @@
   // Insert next frame.
   seq_num_++;
   timestamp_ = 2700;
-  packet_->frameType = VideoFrameType::kVideoFrameDelta;
+  packet_->video_header.frame_type = VideoFrameType::kVideoFrameDelta;
   packet_->video_header.is_first_packet_in_frame = true;
   packet_->markerBit = true;
   packet_->seqNum = seq_num_;
@@ -1257,7 +1258,7 @@
 
   seq_num_ = 2;
   timestamp_ = 2700;
-  packet_->frameType = VideoFrameType::kVideoFrameDelta;
+  packet_->video_header.frame_type = VideoFrameType::kVideoFrameDelta;
   packet_->video_header.is_first_packet_in_frame = true;
   packet_->markerBit = true;
   packet_->seqNum = seq_num_;
@@ -1270,7 +1271,7 @@
   // Insert second frame
   seq_num_--;
   timestamp_ = 0xffffff00;
-  packet_->frameType = VideoFrameType::kVideoFrameKey;
+  packet_->video_header.frame_type = VideoFrameType::kVideoFrameKey;
   packet_->video_header.is_first_packet_in_frame = true;
   packet_->markerBit = true;
   packet_->seqNum = seq_num_;
@@ -1355,7 +1356,7 @@
 
     if (loop == 50) {
       first_key_frame_timestamp = packet_->timestamp;
-      packet_->frameType = VideoFrameType::kVideoFrameKey;
+      packet_->video_header.frame_type = VideoFrameType::kVideoFrameKey;
     }
 
     // Insert frame.
@@ -1399,7 +1400,7 @@
     packet_->markerBit = false;
     packet_->seqNum = seq_num_;
     packet_->timestamp = timestamp_;
-    packet_->frameType = VideoFrameType::kEmptyFrame;
+    packet_->video_header.frame_type = VideoFrameType::kEmptyFrame;
 
     EXPECT_EQ(kNoError, jitter_buffer_->InsertPacket(*packet_, &retransmitted));
   }
@@ -1411,7 +1412,7 @@
   // timestamp.
   // Start with a complete key frame - insert and decode.
   jitter_buffer_->SetNackSettings(kMaxNumberOfFrames, kMaxNumberOfFrames, 0);
-  packet_->frameType = VideoFrameType::kVideoFrameKey;
+  packet_->video_header.frame_type = VideoFrameType::kVideoFrameKey;
   packet_->video_header.is_first_packet_in_frame = true;
   packet_->markerBit = true;
   bool retransmitted = false;
@@ -1424,7 +1425,7 @@
 
   packet_->seqNum += 2;
   packet_->timestamp += 33 * 90;
-  packet_->frameType = VideoFrameType::kVideoFrameDelta;
+  packet_->video_header.frame_type = VideoFrameType::kVideoFrameDelta;
   packet_->video_header.is_first_packet_in_frame = false;
   packet_->markerBit = false;
 
diff --git a/modules/video_coding/packet.cc b/modules/video_coding/packet.cc
index 5dd01e8..46df82a 100644
--- a/modules/video_coding/packet.cc
+++ b/modules/video_coding/packet.cc
@@ -23,7 +23,6 @@
       sizeBytes(0),
       markerBit(false),
       timesNacked(-1),
-      frameType(VideoFrameType::kEmptyFrame),
       completeNALU(kNaluUnset),
       insertStartCode(false),
       video_header(),
@@ -35,7 +34,6 @@
                      size_t size,
                      const RTPHeader& rtp_header,
                      const RTPVideoHeader& videoHeader,
-                     VideoFrameType frame_type,
                      int64_t ntp_time_ms)
     : payloadType(rtp_header.payloadType),
       timestamp(rtp_header.timestamp),
@@ -45,7 +43,6 @@
       sizeBytes(size),
       markerBit(rtp_header.markerBit),
       timesNacked(-1),
-      frameType(frame_type),
       completeNALU(kNaluIncomplete),
       insertStartCode(videoHeader.codec == kVideoCodecH264 &&
                       videoHeader.is_first_packet_in_frame),
diff --git a/modules/video_coding/packet.h b/modules/video_coding/packet.h
index c0d6a6c..3f22845 100644
--- a/modules/video_coding/packet.h
+++ b/modules/video_coding/packet.h
@@ -39,7 +39,6 @@
             size_t size,
             const RTPHeader& rtp_header,
             const RTPVideoHeader& video_header,
-            VideoFrameType frame_type,
             int64_t ntp_time_ms);
 
   ~VCMPacket();
@@ -65,8 +64,6 @@
   bool markerBit;
   int timesNacked;
 
-  VideoFrameType frameType;
-
   VCMNaluCompleteness completeNALU;  // Default is kNaluIncomplete.
   bool insertStartCode;  // True if a start code should be inserted before this
                          // packet.
diff --git a/modules/video_coding/packet_buffer.cc b/modules/video_coding/packet_buffer.cc
index 7c42eb6..69e8c17 100644
--- a/modules/video_coding/packet_buffer.cc
+++ b/modules/video_coding/packet_buffer.cc
@@ -125,7 +125,7 @@
 
     int64_t now_ms = clock_->TimeInMilliseconds();
     last_received_packet_ms_ = now_ms;
-    if (packet->frameType == VideoFrameType::kVideoFrameKey)
+    if (packet->video_header.frame_type == VideoFrameType::kVideoFrameKey)
       last_received_keyframe_packet_ms_ = now_ms;
 
     found_frames = FindFrames(seq_num);
@@ -377,10 +377,10 @@
         const size_t first_packet_index = start_seq_num % size_;
         RTC_CHECK_LT(first_packet_index, size_);
         if (is_h264_keyframe) {
-          data_buffer_[first_packet_index].frameType =
+          data_buffer_[first_packet_index].video_header.frame_type =
               VideoFrameType::kVideoFrameKey;
         } else {
-          data_buffer_[first_packet_index].frameType =
+          data_buffer_[first_packet_index].video_header.frame_type =
               VideoFrameType::kVideoFrameDelta;
         }
 
diff --git a/modules/video_coding/rtp_frame_reference_finder_unittest.cc b/modules/video_coding/rtp_frame_reference_finder_unittest.cc
index 520cb88..7361bb6 100644
--- a/modules/video_coding/rtp_frame_reference_finder_unittest.cc
+++ b/modules/video_coding/rtp_frame_reference_finder_unittest.cc
@@ -82,8 +82,9 @@
     VCMPacket packet;
     packet.video_header.codec = kVideoCodecGeneric;
     packet.seqNum = seq_num_start;
-    packet.frameType = keyframe ? VideoFrameType::kVideoFrameKey
-                                : VideoFrameType::kVideoFrameDelta;
+    packet.video_header.frame_type = keyframe
+                                         ? VideoFrameType::kVideoFrameKey
+                                         : VideoFrameType::kVideoFrameDelta;
     ref_packet_buffer_->InsertPacket(&packet);
 
     packet.seqNum = seq_num_end;
@@ -107,8 +108,9 @@
     packet.seqNum = seq_num_start;
     packet.video_header.is_last_packet_in_frame =
         (seq_num_start == seq_num_end);
-    packet.frameType = keyframe ? VideoFrameType::kVideoFrameKey
-                                : VideoFrameType::kVideoFrameDelta;
+    packet.video_header.frame_type = keyframe
+                                         ? VideoFrameType::kVideoFrameKey
+                                         : VideoFrameType::kVideoFrameDelta;
     auto& vp8_header =
         packet.video_header.video_type_header.emplace<RTPVideoHeaderVP8>();
     vp8_header.pictureId = pid % (1 << 15);
@@ -146,8 +148,9 @@
     packet.seqNum = seq_num_start;
     packet.video_header.is_last_packet_in_frame =
         (seq_num_start == seq_num_end);
-    packet.frameType = keyframe ? VideoFrameType::kVideoFrameKey
-                                : VideoFrameType::kVideoFrameDelta;
+    packet.video_header.frame_type = keyframe
+                                         ? VideoFrameType::kVideoFrameKey
+                                         : VideoFrameType::kVideoFrameDelta;
     vp9_header.flexible_mode = false;
     vp9_header.picture_id = pid % (1 << 15);
     vp9_header.temporal_idx = tid;
@@ -189,8 +192,9 @@
     packet.seqNum = seq_num_start;
     packet.video_header.is_last_packet_in_frame =
         (seq_num_start == seq_num_end);
-    packet.frameType = keyframe ? VideoFrameType::kVideoFrameKey
-                                : VideoFrameType::kVideoFrameDelta;
+    packet.video_header.frame_type = keyframe
+                                         ? VideoFrameType::kVideoFrameKey
+                                         : VideoFrameType::kVideoFrameDelta;
     vp9_header.inter_layer_predicted = inter;
     vp9_header.flexible_mode = true;
     vp9_header.picture_id = pid % (1 << 15);
diff --git a/modules/video_coding/session_info.cc b/modules/video_coding/session_info.cc
index c89f40f..3d4af62 100644
--- a/modules/video_coding/session_info.cc
+++ b/modules/video_coding/session_info.cc
@@ -426,7 +426,7 @@
 int VCMSessionInfo::InsertPacket(const VCMPacket& packet,
                                  uint8_t* frame_buffer,
                                  const FrameData& frame_data) {
-  if (packet.frameType == VideoFrameType::kEmptyFrame) {
+  if (packet.video_header.frame_type == VideoFrameType::kEmptyFrame) {
     // Update sequence number of an empty packet.
     // Only media packets are inserted into the packet list.
     InformOfEmptyPacket(packet.seqNum);
@@ -451,7 +451,7 @@
     return -2;
 
   if (packet.codec() == kVideoCodecH264) {
-    frame_type_ = packet.frameType;
+    frame_type_ = packet.video_header.frame_type;
     if (packet.is_first_packet_in_frame() &&
         (first_packet_seq_num_ == -1 ||
          IsNewerSequenceNumber(first_packet_seq_num_, packet.seqNum))) {
@@ -470,7 +470,7 @@
     // Should only be set for one packet per session.
     if (packet.is_first_packet_in_frame() && first_packet_seq_num_ == -1) {
       // The first packet in a frame signals the frame type.
-      frame_type_ = packet.frameType;
+      frame_type_ = packet.video_header.frame_type;
       // Store the sequence number for the first packet.
       first_packet_seq_num_ = static_cast<int>(packet.seqNum);
     } else if (first_packet_seq_num_ != -1 &&
@@ -480,10 +480,10 @@
              "of frame boundaries";
       return -3;
     } else if (frame_type_ == VideoFrameType::kEmptyFrame &&
-               packet.frameType != VideoFrameType::kEmptyFrame) {
+               packet.video_header.frame_type != VideoFrameType::kEmptyFrame) {
       // Update the frame type with the type of the first media packet.
       // TODO(mikhal): Can this trigger?
-      frame_type_ = packet.frameType;
+      frame_type_ = packet.video_header.frame_type;
     }
 
     // Track the marker bit, should only be set for one packet per session.
diff --git a/modules/video_coding/session_info_unittest.cc b/modules/video_coding/session_info_unittest.cc
index 282834b..eea1722 100644
--- a/modules/video_coding/session_info_unittest.cc
+++ b/modules/video_coding/session_info_unittest.cc
@@ -23,7 +23,7 @@
     memset(packet_buffer_, 0, sizeof(packet_buffer_));
     memset(frame_buffer_, 0, sizeof(frame_buffer_));
     session_.Reset();
-    packet_.frameType = VideoFrameType::kVideoFrameDelta;
+    packet_.video_header.frame_type = VideoFrameType::kVideoFrameDelta;
     packet_.sizeBytes = packet_buffer_size();
     packet_.dataPtr = packet_buffer_;
     packet_.seqNum = 0;
@@ -116,7 +116,7 @@
   packet_.video_header.is_first_packet_in_frame = true;
   packet_.seqNum = 0xFFFE;
   packet_.sizeBytes = packet_buffer_size();
-  packet_.frameType = VideoFrameType::kVideoFrameKey;
+  packet_.video_header.frame_type = VideoFrameType::kVideoFrameKey;
   FillPacket(0);
   EXPECT_EQ(packet_buffer_size(), static_cast<size_t>(session_.InsertPacket(
                                       packet_, frame_buffer_, frame_data)));
@@ -138,7 +138,7 @@
   packet_.markerBit = true;
   packet_.seqNum = 2;
   packet_.sizeBytes = 0;
-  packet_.frameType = VideoFrameType::kEmptyFrame;
+  packet_.video_header.frame_type = VideoFrameType::kEmptyFrame;
   EXPECT_EQ(0, session_.InsertPacket(packet_, frame_buffer_, frame_data));
   EXPECT_EQ(packet_.seqNum, session_.HighSequenceNumber());
 }
@@ -309,7 +309,7 @@
 TEST_F(TestNalUnits, OnlyReceivedEmptyPacket) {
   packet_.video_header.is_first_packet_in_frame = false;
   packet_.completeNALU = kNaluComplete;
-  packet_.frameType = VideoFrameType::kEmptyFrame;
+  packet_.video_header.frame_type = VideoFrameType::kEmptyFrame;
   packet_.sizeBytes = 0;
   packet_.seqNum = 0;
   packet_.markerBit = false;
diff --git a/modules/video_coding/test/stream_generator.cc b/modules/video_coding/test/stream_generator.cc
index 8858812..11b426d 100644
--- a/modules/video_coding/test/stream_generator.cc
+++ b/modules/video_coding/test/stream_generator.cc
@@ -59,7 +59,7 @@
   VCMPacket packet;
   packet.seqNum = sequence_number;
   packet.timestamp = timestamp;
-  packet.frameType = type;
+  packet.video_header.frame_type = type;
   packet.video_header.is_first_packet_in_frame = first_packet;
   packet.markerBit = marker_bit;
   packet.sizeBytes = size;
diff --git a/modules/video_coding/video_packet_buffer_unittest.cc b/modules/video_coding/video_packet_buffer_unittest.cc
index 5f7b8bc..d5432b8 100644
--- a/modules/video_coding/video_packet_buffer_unittest.cc
+++ b/modules/video_coding/video_packet_buffer_unittest.cc
@@ -65,8 +65,9 @@
     packet.video_header.codec = kVideoCodecGeneric;
     packet.timestamp = timestamp;
     packet.seqNum = seq_num;
-    packet.frameType = keyframe == kKeyFrame ? VideoFrameType::kVideoFrameKey
-                                             : VideoFrameType::kVideoFrameDelta;
+    packet.video_header.frame_type = keyframe == kKeyFrame
+                                         ? VideoFrameType::kVideoFrameKey
+                                         : VideoFrameType::kVideoFrameDelta;
     packet.video_header.is_first_packet_in_frame = first == kFirst;
     packet.video_header.is_last_packet_in_frame = last == kLast;
     packet.sizeBytes = data_size;
@@ -163,7 +164,7 @@
   VCMPacket packet;
   packet.video_header.codec = kVideoCodecGeneric;
   packet.seqNum = seq_num;
-  packet.frameType = VideoFrameType::kVideoFrameKey;
+  packet.video_header.frame_type = VideoFrameType::kVideoFrameKey;
   packet.video_header.is_first_packet_in_frame = true;
   packet.video_header.is_last_packet_in_frame = false;
   packet.timesNacked = 0;
@@ -788,7 +789,7 @@
   packet.video_header.video_type_header.emplace<RTPVideoHeaderVP8>();
   packet.timestamp = 1;
   packet.seqNum = 1;
-  packet.frameType = VideoFrameType::kVideoFrameKey;
+  packet.video_header.frame_type = VideoFrameType::kVideoFrameKey;
   EXPECT_TRUE(packet_buffer_->InsertPacket(&packet));
 
   packet.video_header.codec = kVideoCodecH264;
@@ -803,7 +804,7 @@
   packet.video_header.video_type_header.emplace<RTPVideoHeaderVP8>();
   packet.timestamp = 2;
   packet.seqNum = 2;
-  packet.frameType = VideoFrameType::kVideoFrameDelta;
+  packet.video_header.frame_type = VideoFrameType::kVideoFrameDelta;
 
   EXPECT_TRUE(packet_buffer_->InsertPacket(&packet));
 
@@ -815,7 +816,7 @@
   packet.video_header.codec = kVideoCodecH264;
   packet.timestamp = 1;
   packet.seqNum = 1;
-  packet.frameType = VideoFrameType::kVideoFrameKey;
+  packet.video_header.frame_type = VideoFrameType::kVideoFrameKey;
   packet.video_header.is_first_packet_in_frame = true;
   packet.video_header.is_last_packet_in_frame = true;
   auto& h264_header =
diff --git a/modules/video_coding/video_receiver.cc b/modules/video_coding/video_receiver.cc
index 9f62ce6..797f9c1 100644
--- a/modules/video_coding/video_receiver.cc
+++ b/modules/video_coding/video_receiver.cc
@@ -336,8 +336,7 @@
     payloadLength = 0;
   }
   const VCMPacket packet(incomingPayload, payloadLength, rtpInfo.header,
-                         rtpInfo.video_header(), rtpInfo.frameType,
-                         rtpInfo.ntp_time_ms);
+                         rtpInfo.video_header(), rtpInfo.ntp_time_ms);
   int32_t ret = _receiver.InsertPacket(packet);
 
   // TODO(holmer): Investigate if this somehow should use the key frame
diff --git a/modules/video_coding/video_receiver_unittest.cc b/modules/video_coding/video_receiver_unittest.cc
index f0251d6..1c6bd43 100644
--- a/modules/video_coding/video_receiver_unittest.cc
+++ b/modules/video_coding/video_receiver_unittest.cc
@@ -121,14 +121,14 @@
   header.video_header().video_type_header.emplace<RTPVideoHeaderVP8>();
 
   // Insert one video frame to get one frame decoded.
-  header.frameType = VideoFrameType::kVideoFrameKey;
+  header.video_header().frame_type = VideoFrameType::kVideoFrameKey;
   header.video_header().is_first_packet_in_frame = true;
   header.header.markerBit = true;
   InsertAndVerifyDecodableFrame(kPayload, kFrameSize, &header);
 
   clock_.AdvanceTimeMilliseconds(33);
   header.header.timestamp += 3000;
-  header.frameType = VideoFrameType::kEmptyFrame;
+  header.video_header().frame_type = VideoFrameType::kEmptyFrame;
   header.video_header().is_first_packet_in_frame = false;
   header.header.markerBit = false;
   // Insert padding frames.
@@ -171,9 +171,9 @@
     // Insert 2 video frames.
     for (int j = 0; j < 2; ++j) {
       if (i == 0 && j == 0)  // First frame should be a key frame.
-        header.frameType = VideoFrameType::kVideoFrameKey;
+        header.video_header().frame_type = VideoFrameType::kVideoFrameKey;
       else
-        header.frameType = VideoFrameType::kVideoFrameDelta;
+        header.video_header().frame_type = VideoFrameType::kVideoFrameDelta;
       header.video_header().is_first_packet_in_frame = true;
       header.header.markerBit = true;
       InsertAndVerifyDecodableFrame(kPayload, kFrameSize, &header);
@@ -182,7 +182,7 @@
     }
 
     // Insert 2 padding only frames.
-    header.frameType = VideoFrameType::kEmptyFrame;
+    header.video_header().frame_type = VideoFrameType::kEmptyFrame;
     header.video_header().is_first_packet_in_frame = false;
     header.header.markerBit = false;
     for (int j = 0; j < 2; ++j) {