Replace FOURCC__{WP8,WP8L} with FOURCC__WEBP

Fixes #61
This commit is contained in:
Nigel Tao committed 2021-12-15 15:53:14 +11:00
1 parent 8ef4c062d9
commit 4c04ac1127
3 files changed
+8 -22

No files matched your search

+2 -7
View File
@@ -83,17 +83,12 @@ match:
fourcc = -fourcc;
if (fourcc == 0x52494646) { // 'RIFF'be
if (prefix.len < 16) {
if (prefix.len < 12) {
return -1;
}
uint32_t x = wuffs_base__peek_u32be__no_bounds_check(prefix.ptr + 8);
if (x == 0x57454250) { // 'WEBP'be
uint32_t y = wuffs_base__peek_u32be__no_bounds_check(prefix.ptr + 12);
if (y == 0x56503820) { // 'VP8 'be
return 0x57503820; // 'WP8 'be
} else if (y == 0x5650384C) { // 'VP8L'be
return 0x5750384C; // 'WP8L'be
}
return 0x57454250; // 'WEBP'be
}
} else if (fourcc == 0x30302020) { // '00 'be