Only parse PPS up to PPS and SPS ids in the depacketizater.

BUG=
R=danilchap@webrtc.org

Review URL: https://codereview.webrtc.org/2316993002 .

Cr-Commit-Position: refs/heads/master@{#14100}
This commit is contained in:
Stefan Holmer
2016-09-07 12:46:21 +02:00
parent d4626e5f1e
commit 126ee727a0
3 changed files with 46 additions and 9 deletions

View File

@ -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;
}