-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4df96cc
commit f592b7a
Showing
2 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
diff --git a/modules/video_coding/include/video_codec_interface.h b/modules/video_coding/include/video_codec_interface.h | ||
index 46ae0d29e1..fa4cb0e241 100644 | ||
--- a/modules/video_coding/include/video_codec_interface.h | ||
+++ b/modules/video_coding/include/video_codec_interface.h | ||
@@ -51,7 +51,7 @@ struct CodecSpecificInfoVP8 { | ||
size_t updatedBuffers[kBuffersCount]; | ||
size_t updatedBuffersCount; | ||
}; | ||
-static_assert(std::is_pod<CodecSpecificInfoVP8>::value, ""); | ||
+static_assert( std::is_trivial<CodecSpecificInfoVP8>::value && std::is_standard_layout<CodecSpecificInfoVP8>::value, ""); | ||
|
||
// Hack alert - the code assumes that thisstruct is memset when constructed. | ||
struct CodecSpecificInfoVP9 { | ||
@@ -82,7 +82,7 @@ struct CodecSpecificInfoVP9 { | ||
|
||
ABSL_DEPRECATED("") bool end_of_picture; | ||
}; | ||
-static_assert(std::is_pod<CodecSpecificInfoVP9>::value, ""); | ||
+static_assert( std::is_trivial<CodecSpecificInfoVP9>::value && std::is_standard_layout<CodecSpecificInfoVP9>::value, ""); | ||
|
||
// Hack alert - the code assumes that thisstruct is memset when constructed. | ||
struct CodecSpecificInfoH264 { | ||
@@ -91,14 +91,14 @@ struct CodecSpecificInfoH264 { | ||
bool base_layer_sync; | ||
bool idr_frame; | ||
}; | ||
-static_assert(std::is_pod<CodecSpecificInfoH264>::value, ""); | ||
+static_assert( std::is_trivial<CodecSpecificInfoH264>::value && std::is_standard_layout<CodecSpecificInfoH264>::value, ""); | ||
|
||
union CodecSpecificInfoUnion { | ||
CodecSpecificInfoVP8 VP8; | ||
CodecSpecificInfoVP9 VP9; | ||
CodecSpecificInfoH264 H264; | ||
}; | ||
-static_assert(std::is_pod<CodecSpecificInfoUnion>::value, ""); | ||
+static_assert( std::is_trivial<CodecSpecificInfoUnion>::value && std::is_standard_layout<CodecSpecificInfoUnion>::value, ""); | ||
|
||
// Note: if any pointers are added to this struct or its sub-structs, it | ||
// must be fitted with a copy-constructor. This is because it is copied | ||
diff --git a/test/fuzzers/rtp_frame_reference_finder_fuzzer.cc b/test/fuzzers/rtp_frame_reference_finder_fuzzer.cc | ||
index b1cabc31ac..4a9e528560 100644 | ||
--- a/test/fuzzers/rtp_frame_reference_finder_fuzzer.cc | ||
+++ b/test/fuzzers/rtp_frame_reference_finder_fuzzer.cc | ||
@@ -23,7 +23,7 @@ class DataReader { | ||
|
||
template <typename T> | ||
void CopyTo(T* object) { | ||
- static_assert(std::is_pod<T>(), ""); | ||
+ static_assert(std::is_trivial<T>() && std::is_standard_layout<T>(), ""); | ||
uint8_t* destination = reinterpret_cast<uint8_t*>(object); | ||
size_t object_size = sizeof(T); | ||
size_t num_bytes = std::min(size_ - offset_, object_size); | ||
-- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters