39 if (buf[2] !=
':' || buf[5] !=
':' || buf[8] !=
'.')
46 return ms - packet_time;
52 int buf_size = avpkt->
size;
54 const uint8_t *buf_end = buf + buf_size;
57 int64_t packet_time = 0;
60 memset(sub, 0,
sizeof(*sub));
63 if (buf_size < 27 + 7 * 2 + 4 * 3) {
69 if (buf[0] !=
'[' || buf[13] !=
'-' || buf[26] !=
']') {
80 w = bytestream_get_le16(&buf);
81 h = bytestream_get_le16(&buf);
84 x = bytestream_get_le16(&buf);
85 y = bytestream_get_le16(&buf);
87 bytestream_get_le16(&buf);
88 bytestream_get_le16(&buf);
93 bytestream_get_le16(&buf);
97 sub->rects[0] =
av_mallocz(
sizeof(*sub->rects[0]));
99 sub->rects[0]->x = x; sub->rects[0]->y = y;
100 sub->rects[0]->w = w; sub->rects[0]->h = h;
102 sub->rects[0]->pict.linesize[0] = w;
103 sub->rects[0]->pict.data[0] =
av_malloc(w * h);
104 sub->rects[0]->nb_colors = 4;
108 for (i = 0; i < sub->rects[0]->nb_colors; i++)
109 ((uint32_t*)sub->rects[0]->pict.data[1])[i] = bytestream_get_be24(&buf);
111 for (i = 1; i < sub->rects[0]->nb_colors; i++)
112 ((uint32_t*)sub->rects[0]->pict.data[1])[i] |= 0xff000000;
116 bitmap = sub->rects[0]->pict.data[0];
117 for (y = 0; y < h; y++) {
119 if (y == (h + 1) / 2) bitmap = sub->rects[0]->pict.data[0] + w;
120 for (x = 0; x < w; ) {
124 run =
FFMIN(run, w - x);
126 if (!run) run = w - x;
127 memset(bitmap, color, run);