29 #define START_CODE 0x000001
46 for (i = 0; i < buf_size; i++) {
54 nut = (pc->
state64 >> 2 * 8 + 1) & 0x3F;
57 (nut >= 41 && nut <= 44) || (nut >= 48 && nut <= 55)) {
64 int first_slice_segment_in_pic_flag = buf[i] >> 7;
65 if (first_slice_segment_in_pic_flag) {
93 const uint8_t *buf_end = buf + buf_size;
112 memset(h->
nals, 0,
sizeof(*tmp));
119 int src_length, consumed;
121 if (--buf + 2 >= buf_end)
123 src_length = buf_end -
buf;
194 int slice_address_length;
262 const uint8_t **poutbuf,
int *poutbuf_size,
282 *poutbuf_size = buf_size;
293 for (i = 0; i < buf_size; i++) {
294 state = (state << 8) | buf[i];
295 if (((state >> 8) & 0xFFFFFF) ==
START_CODE) {
296 int nut = (state >> 1) & 0x3F;