mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-21 16:47:28 +01:00
Let gif "ignore too much" quirk skip lzw errors
The modified test/data/*/*.gif files differ by only one byte: 00000000 47 49 46 38 39 61 02 00 02 00 81 00 00 00 00 ff |GIF89a..........| 00000010 11 00 ff 22 00 ff 33 00 ff 2c 00 00 00 00 02 00 |..."..3..,......| -00000020 02 00 00 02 02 84 f1 00 3b |........;| +00000020 02 00 00 02 02 84 5d 00 3b |......].;| The etc-good-lzw.gif bits have changed, even though the etc-good-lzw.etc.txt file only had comments added, due to a Go standard library change: "compress/lzw: output a Clear code first, per GIF spec" https://github.com/golang/go/commit/9c1dbdf60edbffeff10f58af21fa055eb0fdd29f Updates PR #57 Updates https://crbug.com/1270631
This commit is contained in:
1 parent
3b882be500
commit
e44920d382
8 files changed
+110
-5
No files matched your search
@@ -31152,6 +31152,30 @@ wuffs_gif__decoder__decode_id_part2(
|
||||
goto label__outer__continue;
|
||||
} else if (v_lzw_status.repr == wuffs_base__suspension__short_write) {
|
||||
goto label__inner__continue;
|
||||
} else if (self->private_impl.f_quirks[3] && (self->private_impl.f_dst_y >= self->private_impl.f_frame_rect_y1) && (self->private_impl.f_interlace == 0)) {
|
||||
if (v_need_block_size || (v_block_size > 0)) {
|
||||
self->private_data.s_decode_id_part2[0].scratch = ((uint32_t)(v_block_size));
|
||||
WUFFS_BASE__COROUTINE_SUSPENSION_POINT(5);
|
||||
if (self->private_data.s_decode_id_part2[0].scratch > ((uint64_t)(io2_a_src - iop_a_src))) {
|
||||
self->private_data.s_decode_id_part2[0].scratch -= ((uint64_t)(io2_a_src - iop_a_src));
|
||||
iop_a_src = io2_a_src;
|
||||
status = wuffs_base__make_status(wuffs_base__suspension__short_read);
|
||||
goto suspend;
|
||||
}
|
||||
iop_a_src += self->private_data.s_decode_id_part2[0].scratch;
|
||||
if (a_src) {
|
||||
a_src->meta.ri = ((size_t)(iop_a_src - a_src->data.ptr));
|
||||
}
|
||||
WUFFS_BASE__COROUTINE_SUSPENSION_POINT(6);
|
||||
status = wuffs_gif__decoder__skip_blocks(self, a_src);
|
||||
if (a_src) {
|
||||
iop_a_src = a_src->data.ptr + a_src->meta.ri;
|
||||
}
|
||||
if (status.repr) {
|
||||
goto suspend;
|
||||
}
|
||||
}
|
||||
goto label__outer__break;
|
||||
}
|
||||
status = v_lzw_status;
|
||||
if (wuffs_base__status__is_error(&status)) {
|
||||
|
||||
Reference in new issue
Block a user