1 diff -Naur libmp4v2.orig/libplatform/io/File_win32.cpp libmp4v2/libplatform/io/File_win32.cpp
2 --- libmp4v2.orig/libplatform/io/File_win32.cpp 2008-11-16 02:50:26.000000000 -0500
3 +++ libmp4v2/libplatform/io/File_win32.cpp 2009-03-13 02:00:09.000000000 -0400
6 StdioFile::getPosition( Size& pos_ )
8 - pos_ = _ftelli64( _handle );
9 + fflush( _handle ); // must flush because we're using _fileno routines
10 + pos_ = _telli64( _fileno( _handle ));
16 StdioFile::getSize( Size& size_ )
18 + fflush( _handle ); // must flush because we're using _fileno routines
20 if( !GetFileSizeEx( (HANDLE)_get_osfhandle( _fileno( _handle )), &n ))
24 StdioFile::setPosition( Size pos_ )
26 - return _fseeki64( _handle, pos_, SEEK_SET ) != 0;
27 + fflush( _handle ); // must flush because we're using _fileno routines
28 + return _lseeki64( _fileno( _handle ), pos_, SEEK_SET ) == -1;
31 ///////////////////////////////////////////////////////////////////////////////