From ac879545ada48eb47cf5e56625fc00a403283890 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 21 May 2015 22:52:14 +0200 Subject: win32: do not call timeEndPeriod(1) on termination This was called for formal reasons at best. The way it does this is somewhat dangerous, because if libmpv is unloaded as DLL, this would attempt to call a dangling function pointer. (No, we don't want an extra DllMain entrypoint just for win32.) --- osdep/timer-win2.c | 8 -------- 1 file changed, 8 deletions(-) (limited to 'osdep') diff --git a/osdep/timer-win2.c b/osdep/timer-win2.c index b87456f3ce..b58379d312 100644 --- a/osdep/timer-win2.c +++ b/osdep/timer-win2.c @@ -52,15 +52,7 @@ uint64_t mp_raw_time_us(void) } #endif -static void restore_timer(void) -{ - // The MSDN documents that begin/end "must" be matched. This satisfies - // this requirement. - timeEndPeriod(1); -} - void mp_raw_time_init(void) { timeBeginPeriod(1); // request 1ms timer resolution - atexit(restore_timer); } -- cgit v1.2.3