[x264-devel] commit: Fix fps reporting on mingw64 (Steven Walters )
git at videolan.org
git at videolan.org
Wed Nov 10 10:12:28 CET 2010
x264 | branch: master | Steven Walters <kemuri9 at gmail.com> | Sat Oct 30 16:51:01 2010 -0400| [49e2d55b5834318a4e370dde8829b2e991752bc7] | committer: Jason Garrett-Glaser
Fix fps reporting on mingw64
_ftime on mingw64 uses __timeb32 which is broken.
Use ftime instead.
> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=49e2d55b5834318a4e370dde8829b2e991752bc7
---
common/mdate.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/common/mdate.c b/common/mdate.c
index aaba97a..702d447 100644
--- a/common/mdate.c
+++ b/common/mdate.c
@@ -39,11 +39,11 @@ int64_t x264_mdate( void )
#ifndef __MINGW32__
struct timeval tv_date;
gettimeofday( &tv_date, NULL );
- return( (int64_t) tv_date.tv_sec * 1000000 + (int64_t) tv_date.tv_usec );
+ return (int64_t)tv_date.tv_sec * 1000000 + (int64_t)tv_date.tv_usec;
#else
- struct _timeb tb;
- _ftime(&tb);
- return ((int64_t)tb.time * (1000) + (int64_t)tb.millitm) * (1000);
+ struct timeb tb;
+ ftime( &tb );
+ return ((int64_t)tb.time * 1000 + (int64_t)tb.millitm) * 1000;
#endif
}
More information about the x264-devel
mailing list