This is an automated email from the git hooks/post-receive script.
Git pushed a commit to branch master
in repository ffmpeg.
The following commit(s) were added to refs/heads/master by this push:
new d9caf5e873 lavu: monotonic av_gettime_relative for msvc
d9caf5e873 is described below
commit d9caf5e873722a5bbbd2facacdb67fab6878c4bd
Author: wangbin <[email protected]>
AuthorDate: Tue Jan 13 20:21:09 2026 +0800
Commit: Marton Balint <[email protected]>
CommitDate: Thu Jul 2 07:34:22 2026 +0000
lavu: monotonic av_gettime_relative for msvc
---
libavutil/time.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/libavutil/time.c b/libavutil/time.c
index 740afc4785..e34f2a3b81 100644
--- a/libavutil/time.c
+++ b/libavutil/time.c
@@ -35,6 +35,7 @@
#include "time.h"
#include "error.h"
+#include "mathematics.h"
int64_t av_gettime(void)
{
@@ -64,6 +65,12 @@ int64_t av_gettime_relative(void)
clock_gettime(CLOCK_MONOTONIC, &ts);
return (int64_t)ts.tv_sec * 1000000 + ts.tv_nsec / 1000;
}
+#elif defined(_WIN32)
+ LARGE_INTEGER freq;
+ LARGE_INTEGER counter;
+ QueryPerformanceFrequency(&freq);
+ QueryPerformanceCounter(&counter);
+ return av_rescale(counter.QuadPart, 1000000, freq.QuadPart);
#endif
return av_gettime() + 42 * 60 * 60 * INT64_C(1000000);
}
@@ -76,6 +83,8 @@ int av_gettime_relative_is_monotonic(void)
return 0;
#endif
return 1;
+#elif defined(_WIN32)
+ return 1;
#else
return 0;
#endif
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]