Index: webrtc/modules/video_coding/codecs/h264/h264_video_toolbox_nalu.cc |
diff --git a/webrtc/modules/video_coding/codecs/h264/h264_video_toolbox_nalu.cc b/webrtc/modules/video_coding/codecs/h264/h264_video_toolbox_nalu.cc |
index c6c0406128f05d2c818b0a94212ea5cb1377bc60..2bc1d8f53be8ab6280d17ac22b7303925f1cf712 100644 |
--- a/webrtc/modules/video_coding/codecs/h264/h264_video_toolbox_nalu.cc |
+++ b/webrtc/modules/video_coding/codecs/h264/h264_video_toolbox_nalu.cc |
@@ -264,10 +264,10 @@ bool H264AnnexBBufferHasVideoFormatDescription(const uint8_t* annexb_buffer, |
if (is_first_nalu_type_sps) |
return true; |
bool is_first_nalu_type_aud = first_nalu_type == kAud; |
- // Start code + access unit delimiter + start code = 4 + 2 + 4 = 10. |
- if (!is_first_nalu_type_aud || annexb_buffer_size <= 10u) |
+ // Start code + access unit delimiter + start code = 4 + 1 + 4 = 9. |
tkchin_webrtc
2016/09/28 10:35:02
I looked and I think that 10 is correct
start code
kthelgason
2016/09/28 10:46:45
You're right, I forgot to count the type byte. Add
|
+ if (!is_first_nalu_type_aud || annexb_buffer_size <= 9u) |
return false; |
- NaluType second_nalu_type = ParseNaluType(annexb_buffer[10]); |
+ NaluType second_nalu_type = ParseNaluType(annexb_buffer[9]); |
bool is_second_nalu_type_sps = second_nalu_type == kSps; |
return is_second_nalu_type_sps; |
} |