Fix potential crash when depacketizing VP8.
Caused by a missing check for H264 when reading the RTPVideoTypeHeader union. R=asapersson@webrtc.org Review URL: https://webrtc-codereview.appspot.com/14049004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@6825 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -140,7 +140,8 @@ int VCMSessionInfo::InsertBuffer(uint8_t* frame_buffer,
|
||||
// two length bytes between each NAL unit, and potentially add start codes.
|
||||
const size_t kH264NALHeaderLengthInBytes = 1;
|
||||
const size_t kLengthFieldLength = 2;
|
||||
if (packet.codecSpecificHeader.codecHeader.H264.stap_a) {
|
||||
if (packet.codecSpecificHeader.codec == kRtpVideoH264 &&
|
||||
packet.codecSpecificHeader.codecHeader.H264.stap_a) {
|
||||
size_t required_length = 0;
|
||||
const uint8_t* nalu_ptr = packet_buffer + kH264NALHeaderLengthInBytes;
|
||||
while (nalu_ptr < packet_buffer + packet.sizeBytes) {
|
||||
|
||||
Reference in New Issue
Block a user