From d236b5c9ba7582abb0cad61c44d7017e2e3542ea Mon Sep 17 00:00:00 2001 From: Dan Minor Date: Thu, 2 Aug 2018 08:50:15 -0400 Subject: [PATCH] Bug 1376873 - Cherrypick rev 09133af36fba93691a22151765097c0bd581c1fa; r=ng Differential Revision: https://phabricator.services.mozilla.com/D7466 --HG-- extra : rebase_source : 71b4f43d9be1717cc60b8adbb4d42a47925b1820 --- .../webrtc/trunk/webrtc/modules/video_coding/packet_buffer.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/media/webrtc/trunk/webrtc/modules/video_coding/packet_buffer.cc b/media/webrtc/trunk/webrtc/modules/video_coding/packet_buffer.cc index 741c11e2aac3..0e619b2e9002 100644 --- a/media/webrtc/trunk/webrtc/modules/video_coding/packet_buffer.cc +++ b/media/webrtc/trunk/webrtc/modules/video_coding/packet_buffer.cc @@ -298,6 +298,10 @@ std::vector> PacketBuffer::FindFrames( if (is_h264 && !is_h264_keyframe) { const RTPVideoHeaderH264& header = data_buffer_[start_index].video_header.codecHeader.H264; + + if (header.nalus_length >= kMaxNalusPerPacket) + return found_frames; + for (size_t j = 0; j < header.nalus_length; ++j) { if (header.nalus[j].type == H264::NaluType::kSps) { has_h264_sps = true;