| Index: webrtc/common_video/h264/h264_common.cc
|
| diff --git a/webrtc/common_video/h264/h264_common.cc b/webrtc/common_video/h264/h264_common.cc
|
| index c17b118ce0b354e16d2cfab42151a0127f119cf4..fe55b02d2cc246bba59da20931d7ff73a1b38626 100644
|
| --- a/webrtc/common_video/h264/h264_common.cc
|
| +++ b/webrtc/common_video/h264/h264_common.cc
|
| @@ -21,8 +21,9 @@ std::vector<NaluIndex> FindNaluIndices(const uint8_t* buffer,
|
| // given a 3-byte sequence we're looking at, if the 3rd byte isn't 1 or 0,
|
| // skip ahead to the next 3-byte sequence. 0s and 1s are relatively rare, so
|
| // this will skip the majority of reads/checks.
|
| - RTC_CHECK_GE(buffer_size, kNaluShortStartSequenceSize);
|
| std::vector<NaluIndex> sequences;
|
| + if (buffer_size < kNaluShortStartSequenceSize)
|
| + return sequences;
|
| const size_t end = buffer_size - kNaluShortStartSequenceSize;
|
| for (size_t i = 0; i < end;) {
|
| if (buffer[i + 2] > 1) {
|
|
|