29 #define DEFAULT_PACKET_SIZE 1024
30 #define OVERREAD_SIZE 3
76 for (; p < end - 3; p += 4) {
77 uint32_t x = *(uint32_t*)p;
79 if (x & (~(x+0x01010101)) & 0x80808080) {
82 }
else if (p[1] == 0xff) {
84 }
else if (p[2] == 0xff) {
86 }
else if (p[3] == 0xff) {
92 for (; p <
end; ++p) {
93 if (*p == 0xff)
return p;
103 unsigned int soi_pos;
107 if (current_pos > current_pos + cache_size)
111 current_pos + cache_size +
133 uint8_t *startmarker_ptr, *
end, *search_end, marker;
152 if (startmarker_ptr >= search_end - 1 ||
153 *(startmarker_ptr + 1) !=
EOI)
break;
156 if (startmarker_ptr != search_end) {
157 marker = *(startmarker_ptr + 1);
162 mxg->
soi_ptr = startmarker_ptr;
163 }
else if (marker ==
EOI) {
185 }
else if ( (
SOF0 <= marker && marker <=
SOF15) ||
186 (
SOS <= marker && marker <=
COM) ) {
205 if (marker ==
APP13 && size >= 16) {
210 pkt->
size = size - 14;
211 pkt->
data = startmarker_ptr + 16;
221 }
else if (marker ==
COM && size >= 18 &&
222 !strncmp(startmarker_ptr + 4,
"MXF", 3)) {