Record H264 NALU type in the h264 header.

BUG=
R=niklas.enbom@webrtc.org, stefan@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/48999004

Cr-Commit-Position: refs/heads/master@{#9072}
This commit is contained in:
Noah Richards
2015-04-23 11:15:08 -07:00
parent fe7a80c38c
commit 9728241e6a
5 changed files with 49 additions and 27 deletions

View File

@ -123,7 +123,7 @@ void VCMPacket::CopyCodecSpecifics(const RTPVideoHeader& videoHeader) {
if (isFirstPacket)
insertStartCode = true;
if (videoHeader.codecHeader.H264.single_nalu) {
if (isFirstPacket && markerBit) {
completeNALU = kNaluComplete;
} else if (isFirstPacket) {
completeNALU = kNaluStart;

View File

@ -136,7 +136,8 @@ size_t VCMSessionInfo::InsertBuffer(uint8_t* frame_buffer,
const size_t kH264NALHeaderLengthInBytes = 1;
const size_t kLengthFieldLength = 2;
if (packet.codecSpecificHeader.codec == kRtpVideoH264 &&
packet.codecSpecificHeader.codecHeader.H264.stap_a) {
packet.codecSpecificHeader.codecHeader.H264.packetization_type ==
kH264StapA) {
size_t required_length = 0;
const uint8_t* nalu_ptr = packet_buffer + kH264NALHeaderLengthInBytes;
while (nalu_ptr < packet_buffer + packet.sizeBytes) {