27 const uint8_t *
const end,
28 uint32_t *
const start_code)
50 else if (
p[-1] > 1 ||
67 *start_code =
static_cast<uint32_t
>(
p[-4]) << 24 |
68 static_cast<uint32_t
>(
p[-3]) << 16 |
69 static_cast<uint32_t
>(
p[-2]) << 8 |
70 static_cast<uint32_t
>(
p[-1]);
75 const uint8_t *
const end,
76 uint32_t *
const start_code)
83 if (*start_code == 0x100)
91 for (
int i = 0; i < 3; i++)
This is in libmythtv because that is where the parsers, which are its main users, are.
bool start_code_is_valid(uint32_t start_code)
Test whether a start code found by find_start_code() is valid.
MTV_PUBLIC const uint8_t * find_start_code(const uint8_t *p, const uint8_t *end, uint32_t *start_code)
Find the first start code in the buffer p.
MTV_PUBLIC const uint8_t * find_start_code_truncated(const uint8_t *p, const uint8_t *end, uint32_t *start_code)
By preserving the start_code value between subsequent calls, the caller can detect start codes across...