shithub: dav1d

Download patch

ref: 4874e8461ed4e31d35893b2596d2c949d5d86345
parent: be15be35336927caf3da6c10349b89ccf035552f
author: Martin Storsjö <martin@martin.st>
date: Thu Nov 29 10:43:39 EST 2018

ivf: Use int64_t instead of off_t

off_t isn't available in all environments.

On Ubuntu 16.04, GCC 5.4, glibc 2.23, off_t is defined by stdio.h
normally, but if building with -std=c99 (which dav1d does), it no
longer is defined. If fcntl.h is included additionally (which isn't
done in dav1d), it still gets defined though.

off_t isn't available in MSVC at all.

--- a/tools/input/ivf.c
+++ b/tools/input/ivf.c
@@ -95,7 +95,7 @@
     uint8_t *ptr;
     int res;
 
-    const off_t off = ftello(c->f);
+    const int64_t off = ftello(c->f);
     if ((res = fread(data, 4, 1, c->f)) != 1)
         return -1; // EOF
     const ptrdiff_t sz = rl32(data);