Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(505)

Unified Diff: webrtc/modules/rtp_rtcp/source/rtp_format_h264.cc

Issue 2381233004: Revert of Use sps and pps to determine decodability of H.264 frames. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/modules/rtp_rtcp/source/rtp_format_h264_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/rtp_rtcp/source/rtp_format_h264.cc
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_format_h264.cc b/webrtc/modules/rtp_rtcp/source/rtp_format_h264.cc
index d4729afba1577eff93a0ab60d87e46c04d51cf7a..19467ca6513421cbb628fe0f7f35bb9fe77190c8 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_format_h264.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtp_format_h264.cc
@@ -484,8 +484,6 @@
parsed_payload->type.Video.width = sps->width;
parsed_payload->type.Video.height = sps->height;
nalu.sps_id = sps->id;
- } else {
- LOG(LS_WARNING) << "Failed to parse SPS id from SPS slice.";
}
parsed_payload->frame_type = kVideoFrameKey;
break;
@@ -512,12 +510,8 @@
default: {
rtc::Optional<uint32_t> pps_id = PpsParser::ParsePpsIdFromSlice(
&payload_data[start_offset], end_offset - start_offset);
- if (pps_id) {
+ if (pps_id)
nalu.pps_id = *pps_id;
- } else {
- LOG(LS_WARNING) << "Failed to parse PPS id from slice of type: "
- << static_cast<int>(nalu.type);
- }
break;
}
}
@@ -553,13 +547,8 @@
length_ -= kNalHeaderSize;
rtc::Optional<uint32_t> pps_id = PpsParser::ParsePpsIdFromSlice(
payload_data + 2 * kNalHeaderSize, length_ - kNalHeaderSize);
- if (pps_id) {
+ if (pps_id)
nalu.pps_id = *pps_id;
- } else {
- LOG(LS_WARNING) << "Failed to parse PPS from first fragment of FU-A NAL "
- "unit with original type: "
- << static_cast<int>(nalu.type);
- }
uint8_t original_nal_header = fnri | original_nal_type;
modified_buffer_.reset(new rtc::Buffer());
modified_buffer_->AppendData(payload_data + kNalHeaderSize, length_);
@@ -581,10 +570,8 @@
RTPVideoHeaderH264* h264 = &parsed_payload->type.Video.codecHeader.H264;
h264->packetization_type = kH264FuA;
h264->nalu_type = original_nal_type;
- if (first_fragment) {
- h264->nalus[h264->nalus_length] = nalu;
- h264->nalus_length = 1;
- }
+ h264->nalus[h264->nalus_length] = nalu;
+ h264->nalus_length = 1;
return true;
}
« no previous file with comments | « no previous file | webrtc/modules/rtp_rtcp/source/rtp_format_h264_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698