Remove RTPVideoHeader::h264() accessors.
Bug: none
Change-Id: I043bcaf358575688b223bc3631506e148b47fd58
Reviewed-on: https://webrtc-review.googlesource.com/88220
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23971}
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;
}
}