From 18f7607e1bb397f67c318b964fc8060072fc2cdb Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch Date: Tue, 14 Dec 2021 01:20:52 +0100 Subject: Add a most basic tool to inspect ISO BMFF files This can be massively extended. --- tools/webpinfo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools/webpinfo.c') diff --git a/tools/webpinfo.c b/tools/webpinfo.c index f13ef28..a138985 100644 --- a/tools/webpinfo.c +++ b/tools/webpinfo.c @@ -38,7 +38,7 @@ parse_webp(jv o, const uint8_t *p, size_t len) // TODO(p): This can still be parseable. // TODO(p): Warn on trailing data. - uint32_t size = unle.u32(p + 4); + uint32_t size = u32le(p + 4); if (8 + size < len) return add_error(o, "truncated file"); @@ -53,7 +53,7 @@ parse_webp(jv o, const uint8_t *p, size_t len) break; } - uint32_t chunk_size = unle.u32(p + 4); + uint32_t chunk_size = u32le(p + 4); uint32_t chunk_advance = (chunk_size + 1) & ~1; if (p + 8 + chunk_advance > end) { o = add_warning(o, "runaway chunk payload"); -- cgit v1.2.3-54-g00ecf