OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
589 EXPECT_EQ(kRtpVideoVp8, payload.type.Video.codec); | 589 EXPECT_EQ(kRtpVideoVp8, payload.type.Video.codec); |
590 VerifyBasicHeader(&payload.type, 1, 1, 0); | 590 VerifyBasicHeader(&payload.type, 1, 1, 0); |
591 VerifyExtensions(&payload.type, | 591 VerifyExtensions(&payload.type, |
592 input_header.pictureId, | 592 input_header.pictureId, |
593 input_header.tl0PicIdx, | 593 input_header.tl0PicIdx, |
594 input_header.temporalIdx, | 594 input_header.temporalIdx, |
595 input_header.keyIdx); | 595 input_header.keyIdx); |
596 EXPECT_EQ(payload.type.Video.codecHeader.VP8.layerSync, | 596 EXPECT_EQ(payload.type.Video.codecHeader.VP8.layerSync, |
597 input_header.layerSync); | 597 input_header.layerSync); |
598 } | 598 } |
| 599 |
| 600 TEST_F(RtpDepacketizerVp8Test, TestEmptyPayload) { |
| 601 // Using a wild pointer to crash on accesses from inside the depacketizer. |
| 602 uint8_t* garbage_ptr = reinterpret_cast<uint8_t*>(0x4711); |
| 603 RtpDepacketizer::ParsedPayload payload; |
| 604 EXPECT_FALSE(depacketizer_->Parse(&payload, garbage_ptr, 0)); |
| 605 } |
599 } // namespace webrtc | 606 } // namespace webrtc |
OLD | NEW |