36 if (end - start < nal_length_size)
38 while (nal_length_size--)
39 res = (res << 8) | *start++;
41 if (start + res > end || res < 0 || start + res < start)
51 av_log(s1,
AV_LOG_DEBUG,
"Sending NAL %x of len %d M=%d\n", buf[0] & 0x1F, size, last);
55 uint8_t type = buf[0] & 0x1F;
56 uint8_t nri = buf[0] & 0x60;
70 s->
buf[1] &= ~(1 << 7);
73 memcpy(&s->
buf[2], buf, size);
80 const uint8_t *
r, *end = buf1 +
size;