Use _fseeki64 on Windows, where fseek is always 32-bit. Seek correctly when Vorbis...
authorivo <ivo@xiph.org>
Sun, 28 Sep 2008 21:10:07 +0000 (21:10 +0000)
committerivo <ivo@xiph.org>
Sun, 28 Sep 2008 21:10:07 +0000 (21:10 +0000)
2GB in size.  Patch by Peter Harris.

svn path=/trunk/vorbis/; revision=15347

include/vorbis/vorbisfile.h

index 3966f7c..fe3a3cc 100644 (file)
@@ -50,7 +50,11 @@ typedef struct {
 
 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 @@ extern int ov_halfrate_p(OggVorbis_File *vf);
 
 #endif
 
-