From 0c06ffd2353b19f7f9a23216fa6c9d0e0bcc704d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathias=20Panzenb=C3=B6ck?= Date: Thu, 12 Mar 2015 23:44:40 +0100 Subject: [PATCH] fix bink video parsing --- src/bink.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/bink.c b/src/bink.c index 6577c33..5d4233b 100644 --- a/src/bink.c +++ b/src/bink.c @@ -9,12 +9,12 @@ int bink_isfile(const uint8_t *data, size_t input_len, size_t *lengthptr) if (!IS_BINK_MAGIC(magic)) return 0; - size_t length = le16toh(*(uint32_t *)(data + 4)) + 8; - uint32_t frame_count = le16toh(*(uint32_t *)(data + 8)); - uint32_t width = le16toh(*(uint32_t *)(data + 20)); - uint32_t height = le16toh(*(uint32_t *)(data + 24)); - uint32_t fps_num = le16toh(*(uint32_t *)(data + 28)); - uint32_t fps_den = le16toh(*(uint32_t *)(data + 32)); + size_t length = le32toh(*(uint32_t *)(data + 4)) + 8; + size_t frame_count = le32toh(*(uint32_t *)(data + 8)); + size_t width = le32toh(*(uint32_t *)(data + 20)); + size_t height = le32toh(*(uint32_t *)(data + 24)); + size_t fps_num = le32toh(*(uint32_t *)(data + 28)); + size_t fps_den = le32toh(*(uint32_t *)(data + 32)); if (input_len < length || frame_count == 0 ||