Reland "Remove RTPVideoHeader::h264() accessors."

Downstream projects have been updated, so this can now be relanded.
This is a revert (and rebase) of: https://webrtc-review.googlesource.com/c/src/+/88820

Bug: none
Change-Id: I424664ddef7aeebd3c6c94ae67c7f70a342dc9a4
Reviewed-on: https://webrtc-review.googlesource.com/92082
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24181}
diff --git a/modules/video_coding/packet_buffer.cc b/modules/video_coding/packet_buffer.cc
index 28ade46..e1172b3 100644
--- a/modules/video_coding/packet_buffer.cc
+++ b/modules/video_coding/packet_buffer.cc
@@ -303,18 +303,17 @@
           break;
 
         if (is_h264 && !is_h264_keyframe) {
-          const RTPVideoHeaderH264& header =
-              data_buffer_[start_index].video_header.h264();
-
-          if (header.nalus_length >= kMaxNalusPerPacket)
+          const auto* h264_header = absl::get_if<RTPVideoHeaderH264>(
+              &data_buffer_[start_index].video_header.video_type_header);
+          if (!h264_header || h264_header->nalus_length >= kMaxNalusPerPacket)
             return found_frames;
 
-          for (size_t j = 0; j < header.nalus_length; ++j) {
-            if (header.nalus[j].type == H264::NaluType::kSps) {
+          for (size_t j = 0; j < h264_header->nalus_length; ++j) {
+            if (h264_header->nalus[j].type == H264::NaluType::kSps) {
               has_h264_sps = true;
-            } else if (header.nalus[j].type == H264::NaluType::kPps) {
+            } else if (h264_header->nalus[j].type == H264::NaluType::kPps) {
               has_h264_pps = true;
-            } else if (header.nalus[j].type == H264::NaluType::kIdr) {
+            } else if (h264_header->nalus[j].type == H264::NaluType::kIdr) {
               has_h264_idr = true;
             }
           }