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}
This commit is contained in:
philipel
2018-07-12 15:09:06 +02:00
committed by Commit Bot
parent 7258224c3b
commit dfbced6504
15 changed files with 227 additions and 205 deletions

View File

@ -303,18 +303,17 @@ std::vector<std::unique_ptr<RtpFrameObject>> PacketBuffer::FindFrames(
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;
}
}