33 void *
data,
int *got_frame,
38 int buf_size = avpkt->
size;
55 if (buf_end - buf < 0x68 + 4)
61 if (colors < 0 || colors > 256) {
65 if (buf_end - buf < (colors + 1) * 8)
68 pal = (uint32_t*)p->
data[1];
69 for (i = 0; i <= colors; i++) {
85 pal[idx] = (r << 16) | (g << 8) |
b;
89 if (buf_end - buf < 18)
92 for (i = 0; i < avctx->
height; i++) {
93 int size, left, code, pix;
102 if (buf_end - buf < size)
111 if ((out + (257 - code)) > (outdata + p->
linesize[0]))
113 memset(out, pix, 257 - code);
118 if ((out + code) > (outdata + p->
linesize[0]))
120 if (buf_end - buf < code + 1)
122 memcpy(out, buf, code + 1);