diff options
author | Martin Storsjö <martin@martin.st> | 2019-11-22 00:08:12 +0300 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2019-11-22 00:08:36 +0300 |
commit | 4d9c990e3703ce49da5f5e6bbc8dea0638f46cfa (patch) | |
tree | 64f9c77f7e3a0abcc82e2bae1eb44546645de72b /tools | |
parent | 46d092ae6ac62284e5bdde4d0808aca4ab7410a9 (diff) |
section5: use signed type for seeking backwards
Should fix failures of 'section5' sample on 32-bit systems.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/input/section5.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/input/section5.c b/tools/input/section5.c index dfe5ab9..0c2ce28 100644 --- a/tools/input/section5.c +++ b/tools/input/section5.c @@ -32,6 +32,7 @@ #include <stdint.h> #include <stdlib.h> #include <string.h> +#include <sys/types.h> #include "dav1d/headers.h" @@ -157,7 +158,7 @@ static int section5_read(Section5InputContext *const c, Dav1dData *const data) { fseeko(c->f, len, SEEK_CUR); // skip packet, we'll read it below } - fseeko(c->f, -total_bytes, SEEK_CUR); + fseeko(c->f, -(off_t)total_bytes, SEEK_CUR); uint8_t *ptr = dav1d_data_create(data, total_bytes); if (!ptr) return -1; if (fread(ptr, total_bytes, 1, c->f) != 1) { |