Index: webrtc/modules/rtp_rtcp/source/rtp_format_h264_unittest.cc |
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_format_h264_unittest.cc b/webrtc/modules/rtp_rtcp/source/rtp_format_h264_unittest.cc |
index 8fa83010f6f5760282f5ea3b925c57e84fb274d9..7bf1cf1b6f8e783d7f0c2f90aa95c460b276b711 100644 |
--- a/webrtc/modules/rtp_rtcp/source/rtp_format_h264_unittest.cc |
+++ b/webrtc/modules/rtp_rtcp/source/rtp_format_h264_unittest.cc |
@@ -545,4 +545,22 @@ TEST_F(RtpDepacketizerH264Test, TestEmptyPayload) { |
EXPECT_FALSE(depacketizer_->Parse(&payload, garbage_ptr, 0)); |
} |
+TEST_F(RtpDepacketizerH264Test, TestTruncatedFuaNalu) { |
+ const uint8_t kPayload[] = {0x9c}; |
+ RtpDepacketizer::ParsedPayload payload; |
+ EXPECT_FALSE(depacketizer_->Parse(&payload, kPayload, sizeof(kPayload))); |
+} |
+ |
+TEST_F(RtpDepacketizerH264Test, TestTruncatedSingleStapANalu) { |
+ const uint8_t kPayload[] = {0xd8, 0x27}; |
+ RtpDepacketizer::ParsedPayload payload; |
+ EXPECT_FALSE(depacketizer_->Parse(&payload, kPayload, sizeof(kPayload))); |
+} |
+ |
+TEST_F(RtpDepacketizerH264Test, TestTruncationJustAfterSingleStapANalu) { |
+ const uint8_t kPayload[] = {0x38, 0x27, 0x27}; |
+ RtpDepacketizer::ParsedPayload payload; |
+ EXPECT_FALSE(depacketizer_->Parse(&payload, kPayload, sizeof(kPayload))); |
+} |
+ |
} // namespace webrtc |