-/* search next start code */
-static unsigned int find_startcode(const uint8_t *buf, int buf_size, int *pos)
-{
- unsigned int startcode = 0xFF;
-
- for (; *pos < buf_size;) {
- startcode = ((startcode << 8) | buf[*pos]) & 0xFFFFFFFF;
- *pos +=1;
- if ((startcode & 0xFFFFFF00) != 0x100)
- continue; /* no startcode */
- return startcode;
- }
-
- return 0;
-}
-