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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
88 hdr_info_.nonReference = false; | 88 hdr_info_.nonReference = false; |
89 hdr_info_.temporalIdx = kNoTemporalIdx; | 89 hdr_info_.temporalIdx = kNoTemporalIdx; |
90 hdr_info_.layerSync = false; | 90 hdr_info_.layerSync = false; |
91 hdr_info_.tl0PicIdx = kNoTl0PicIdx; | 91 hdr_info_.tl0PicIdx = kNoTl0PicIdx; |
92 hdr_info_.keyIdx = kNoKeyIdx; | 92 hdr_info_.keyIdx = kNoKeyIdx; |
93 if (helper_ != NULL) | 93 if (helper_ != NULL) |
94 return false; | 94 return false; |
95 helper_ = new test::RtpFormatVp8TestHelper(&hdr_info_); | 95 helper_ = new test::RtpFormatVp8TestHelper(&hdr_info_); |
96 return helper_->Init(partition_sizes, num_partitions); | 96 return helper_->Init(partition_sizes, num_partitions); |
97 } | 97 } |
98 | |
danilchap
2017/09/04 09:03:04
may be undo this line deletion to make CL one file
sprang_webrtc
2017/09/04 11:09:28
Whoops, yes. Had set my diff tool to ignore whites
| |
99 RTPVideoHeaderVP8 hdr_info_; | 98 RTPVideoHeaderVP8 hdr_info_; |
100 test::RtpFormatVp8TestHelper* helper_; | 99 test::RtpFormatVp8TestHelper* helper_; |
101 }; | 100 }; |
102 | 101 |
103 TEST_F(RtpPacketizerVp8Test, TestStrictMode) { | 102 TEST_F(RtpPacketizerVp8Test, TestStrictMode) { |
104 const size_t kSizeVector[] = {10, 8, 27}; | 103 const size_t kSizeVector[] = {10, 8, 27}; |
105 const size_t kNumPartitions = GTEST_ARRAY_SIZE_(kSizeVector); | 104 const size_t kNumPartitions = GTEST_ARRAY_SIZE_(kSizeVector); |
106 ASSERT_TRUE(Init(kSizeVector, kNumPartitions)); | 105 ASSERT_TRUE(Init(kSizeVector, kNumPartitions)); |
107 | 106 |
108 hdr_info_.pictureId = 200; | 107 hdr_info_.pictureId = 200; |
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
722 input_header.layerSync); | 721 input_header.layerSync); |
723 } | 722 } |
724 | 723 |
725 TEST_F(RtpDepacketizerVp8Test, TestEmptyPayload) { | 724 TEST_F(RtpDepacketizerVp8Test, TestEmptyPayload) { |
726 // Using a wild pointer to crash on accesses from inside the depacketizer. | 725 // Using a wild pointer to crash on accesses from inside the depacketizer. |
727 uint8_t* garbage_ptr = reinterpret_cast<uint8_t*>(0x4711); | 726 uint8_t* garbage_ptr = reinterpret_cast<uint8_t*>(0x4711); |
728 RtpDepacketizer::ParsedPayload payload; | 727 RtpDepacketizer::ParsedPayload payload; |
729 EXPECT_FALSE(depacketizer_->Parse(&payload, garbage_ptr, 0)); | 728 EXPECT_FALSE(depacketizer_->Parse(&payload, garbage_ptr, 0)); |
730 } | 729 } |
731 } // namespace webrtc | 730 } // namespace webrtc |
OLD | NEW |