diff options
Diffstat (limited to 'contrib/libmp4v2/P01-mingw-msvcrt-lower.patch')
-rw-r--r-- | contrib/libmp4v2/P01-mingw-msvcrt-lower.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/contrib/libmp4v2/P01-mingw-msvcrt-lower.patch b/contrib/libmp4v2/P01-mingw-msvcrt-lower.patch new file mode 100644 index 000000000..384542b06 --- /dev/null +++ b/contrib/libmp4v2/P01-mingw-msvcrt-lower.patch @@ -0,0 +1,31 @@ +diff -Naur libmp4v2.orig/libplatform/io/File_win32.cpp libmp4v2/libplatform/io/File_win32.cpp +--- libmp4v2.orig/libplatform/io/File_win32.cpp 2008-11-16 02:50:26.000000000 -0500 ++++ libmp4v2/libplatform/io/File_win32.cpp 2009-03-13 02:00:09.000000000 -0400 +@@ -8,7 +8,8 @@ + bool + StdioFile::getPosition( Size& pos_ ) + { +- pos_ = _ftelli64( _handle ); ++ fflush( _handle ); // must flush because we're using _fileno routines ++ pos_ = _telli64( _fileno( _handle )); + return pos_ == -1; + } + +@@ -17,6 +18,7 @@ + bool + StdioFile::getSize( Size& size_ ) + { ++ fflush( _handle ); // must flush because we're using _fileno routines + LARGE_INTEGER n; + if( !GetFileSizeEx( (HANDLE)_get_osfhandle( _fileno( _handle )), &n )) + return true; +@@ -29,7 +31,8 @@ + bool + StdioFile::setPosition( Size pos_ ) + { +- return _fseeki64( _handle, pos_, SEEK_SET ) != 0; ++ fflush( _handle ); // must flush because we're using _fileno routines ++ return _lseeki64( _fileno( _handle ), pos_, SEEK_SET ) == -1; + } + + /////////////////////////////////////////////////////////////////////////////// |