Fix possible compilation errors with gcc
Remove custom constructors, which is no longer needed with C++11. Use C++ struct zero initialization instead. Fixes #686. Change-Id: I512da9f23a250e8b9ebf8bb8e0a39ad0f822d0d3
This commit is contained in:
parent
b900565a0f
commit
624b2ca725
|
@ -103,22 +103,6 @@ bool H264SliceHeader::IsSISlice() const {
|
|||
return (slice_type % 5 == kSISlice);
|
||||
}
|
||||
|
||||
H264Sps::H264Sps() {
|
||||
memset(this, 0, sizeof(*this));
|
||||
}
|
||||
|
||||
H264Pps::H264Pps() {
|
||||
memset(this, 0, sizeof(*this));
|
||||
}
|
||||
|
||||
H264SliceHeader::H264SliceHeader() {
|
||||
memset(this, 0, sizeof(*this));
|
||||
}
|
||||
|
||||
H264SEIMessage::H264SEIMessage() {
|
||||
memset(this, 0, sizeof(*this));
|
||||
}
|
||||
|
||||
#define READ_BITS_OR_RETURN(num_bits, out) \
|
||||
do { \
|
||||
if (!br->ReadBits(num_bits, (out))) { \
|
||||
|
@ -991,7 +975,7 @@ H264Parser::Result H264Parser::ParseSliceHeader(const Nalu& nalu,
|
|||
reader.Initialize(nalu.data() + nalu.header_size(), nalu.payload_size());
|
||||
H26xBitReader* br = &reader;
|
||||
|
||||
memset(reinterpret_cast<void*>(shdr), 0, sizeof(*shdr));
|
||||
*shdr = {};
|
||||
|
||||
shdr->idr_pic_flag = (nalu.type() == 5);
|
||||
shdr->nal_ref_idc = nalu.ref_idc();
|
||||
|
@ -1137,7 +1121,7 @@ H264Parser::Result H264Parser::ParseSEI(const Nalu& nalu,
|
|||
reader.Initialize(nalu.data() + nalu.header_size(), nalu.payload_size());
|
||||
H26xBitReader* br = &reader;
|
||||
|
||||
memset(reinterpret_cast<void*>(sei_msg), 0, sizeof(*sei_msg));
|
||||
*sei_msg = {};
|
||||
|
||||
READ_BITS_OR_RETURN(8, &byte);
|
||||
while (byte == 0xff) {
|
||||
|
|
|
@ -35,8 +35,6 @@ enum {
|
|||
};
|
||||
|
||||
struct H264Sps {
|
||||
H264Sps();
|
||||
|
||||
int profile_idc;
|
||||
bool constraint_set0_flag;
|
||||
bool constraint_set1_flag;
|
||||
|
@ -92,8 +90,6 @@ struct H264Sps {
|
|||
};
|
||||
|
||||
struct H264Pps {
|
||||
H264Pps();
|
||||
|
||||
int pic_parameter_set_id;
|
||||
int seq_parameter_set_id;
|
||||
bool entropy_coding_mode_flag;
|
||||
|
@ -144,8 +140,6 @@ struct H264DecRefPicMarking {
|
|||
};
|
||||
|
||||
struct H264SliceHeader {
|
||||
H264SliceHeader();
|
||||
|
||||
enum {
|
||||
kRefListSize = 32,
|
||||
kRefListModSize = kRefListSize
|
||||
|
@ -230,8 +224,6 @@ struct H264SEIRecoveryPoint {
|
|||
};
|
||||
|
||||
struct H264SEIMessage {
|
||||
H264SEIMessage();
|
||||
|
||||
enum Type {
|
||||
kSEIRecoveryPoint = 6,
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue