1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

CI: Cover kernel utility

This commit is contained in:
winlin 2019-02-04 15:11:41 +08:00
parent 572ce5ccff
commit 4187fa0068
5 changed files with 144 additions and 30 deletions

View file

@ -77,6 +77,10 @@ srs_error_t srs_avc_nalu_read_uev(SrsBitBuffer* stream, int32_t& v)
v = (1 << leadingZeroBits) - 1;
for (int i = 0; i < (int)leadingZeroBits; i++) {
if (stream->empty()) {
return srs_error_new(ERROR_AVC_NALU_UEV, "no bytes for leadingZeroBits=%d", leadingZeroBits);
}
int32_t b = stream->read_bit();
v += b << (leadingZeroBits - 1 - i);
}
@ -97,8 +101,8 @@ srs_error_t srs_avc_nalu_read_bit(SrsBitBuffer* stream, int8_t& v)
return err;
}
static int64_t _srs_system_time_us_cache = 0;
static int64_t _srs_system_time_startup_time = 0;
int64_t _srs_system_time_us_cache = 0;
int64_t _srs_system_time_startup_time = 0;
int64_t srs_get_system_time_ms()
{