[xiph-commits] r15347 - trunk/vorbis/include/vorbis

ivo at svn.xiph.org ivo at svn.xiph.org
Sun Sep 28 14:10:07 PDT 2008


Author: ivo
Date: 2008-09-28 14:10:07 -0700 (Sun, 28 Sep 2008)
New Revision: 15347

Modified:
   trunk/vorbis/include/vorbis/vorbisfile.h
Log:
Use _fseeki64 on Windows, where fseek is always 32-bit.  Seek correctly when Vorbis file is over
2GB in size.  Patch by Peter Harris.

Modified: trunk/vorbis/include/vorbis/vorbisfile.h
===================================================================
--- trunk/vorbis/include/vorbis/vorbisfile.h	2008-09-28 18:06:00 UTC (rev 15346)
+++ trunk/vorbis/include/vorbis/vorbisfile.h	2008-09-28 21:10:07 UTC (rev 15347)
@@ -50,7 +50,11 @@
 
 static int _ov_header_fseek_wrap(FILE *f,ogg_int64_t off,int whence){
   if(f==NULL)return(-1);
+#ifdef _WIN32
+  return _fseeki64(f,off,whence);
+#else
   return fseek(f,off,whence);
+#endif
 }
 
 /* These structs below (OV_CALLBACKS_DEFAULT etc) are defined here as
@@ -192,4 +196,3 @@
 
 #endif
 
-



More information about the commits mailing list