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

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

Issue 2316993002: Only parse PPS up to PPS and SPS ids in the depacketizater. (Closed)
Patch Set: Comment addressed. 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 | « webrtc/common_video/h264/pps_parser.cc ('k') | no next file » | 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 1a3408e306842c0d92b499c42b5096ca2c0f1b3d..19467ca6513421cbb628fe0f7f35bb9fe77190c8 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_format_h264.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtp_format_h264.cc
@@ -489,11 +489,16 @@ bool RtpDepacketizerH264::ProcessStapAOrSingleNalu(
break;
}
case H264::NaluType::kPps: {
- rtc::Optional<PpsParser::PpsState> pps = PpsParser::ParsePps(
- &payload_data[start_offset], end_offset - start_offset);
- if (pps) {
- nalu.sps_id = pps->sps_id;
- nalu.pps_id = pps->id;
+ uint32_t pps_id;
+ uint32_t sps_id;
+ if (PpsParser::ParsePpsIds(&payload_data[start_offset],
+ end_offset - start_offset, &pps_id,
+ &sps_id)) {
+ nalu.pps_id = pps_id;
+ nalu.sps_id = sps_id;
+ } else {
+ LOG(LS_WARNING)
+ << "Failed to parse PPS id and SPS id from PPS slice.";
}
break;
}
« no previous file with comments | « webrtc/common_video/h264/pps_parser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698