parent
93fe5457bf
commit
15dacf6288
|
@ -525,7 +525,7 @@ bool VP9Parser::Parse(const uint8_t* data,
|
|||
<< "\n header_size: " << header_size;
|
||||
|
||||
RCHECK(header_size > 0);
|
||||
RCHECK(header_size * 8 <= reader.bits_available());
|
||||
RCHECK(header_size * 8u <= reader.bits_available());
|
||||
|
||||
data += vpx_frame.frame_size;
|
||||
}
|
||||
|
|
|
@ -104,7 +104,7 @@ bool VPCodecConfigurationRecord::ParseMP4(const std::vector<uint8_t>& data) {
|
|||
RCHECK(reader.ReadBits(1, &video_full_range_flag_));
|
||||
uint16_t codec_initialization_data_size = 0;
|
||||
RCHECK(reader.ReadBits(16, &codec_initialization_data_size));
|
||||
RCHECK(reader.bits_available() >= codec_initialization_data_size * 8);
|
||||
RCHECK(reader.bits_available() >= codec_initialization_data_size * 8u);
|
||||
const size_t header_size = data.size() - reader.bits_available() / 8;
|
||||
codec_initialization_data_.assign(
|
||||
data.begin() + header_size,
|
||||
|
|
|
@ -208,7 +208,7 @@ bool WvmMediaParser::Parse(const uint8_t* buf, int size) {
|
|||
parse_state_ = SystemHeaderSkip;
|
||||
break;
|
||||
case PackHeaderStuffingSkip:
|
||||
if ((end - read_ptr) >= skip_bytes_) {
|
||||
if (end >= skip_bytes_ + read_ptr) {
|
||||
read_ptr += skip_bytes_;
|
||||
skip_bytes_ = 0;
|
||||
parse_state_ = StartCode1;
|
||||
|
@ -218,7 +218,7 @@ bool WvmMediaParser::Parse(const uint8_t* buf, int size) {
|
|||
}
|
||||
continue;
|
||||
case SystemHeaderSkip:
|
||||
if ((end - read_ptr) >= skip_bytes_) {
|
||||
if (end >= skip_bytes_ + read_ptr) {
|
||||
read_ptr += skip_bytes_;
|
||||
skip_bytes_ = 0;
|
||||
parse_state_ = StartCode1;
|
||||
|
|
Loading…
Reference in New Issue