mpv/osdep
wm4 5728295dab timer: fix a corner case on clock changes
It's conceivable that the OS time source is subject to clock changes.
The time could jump back to before when mpv was started, which would
cause mp_time_us() to return values smaller than 1. This is unexpected
by the code and could trigger assertions. If there's no monotonic time
source there's not much we can do anyway, so just sanitize the return
value. It will cause strange behavior until the "lost" time offset has
passed, but if you make such huge changes to the system clock while
everything is running, you're asking for trouble anyway.

(Normally we try to get a monotonic time source, though. This problem
sometimes happened on Windows when compiled without winpthreads, when
the code was falling back to gettimeofday(). This was already fixed by
always using another method.)
2015-07-04 17:24:10 +02:00
..
ar Remove trailing whitespaces 2015-05-15 11:02:44 +02:00
win32 win32: add native wrappers for pthread functions 2015-01-01 15:10:42 +01:00
atomics.h ao: make better use of atomics 2015-05-11 23:27:41 +02:00
compiler.h
endian.h
glob-win.c
io.c Update license headers 2015-04-13 12:10:01 +02:00
io.h Update license headers 2015-04-13 12:10:01 +02:00
macosx_application.h build: move main-fn files to osdep 2015-05-02 18:59:58 +02:00
macosx_application.m osx: never expose input_ctx from EventsResponder 2015-05-26 22:39:04 +02:00
macosx_application_objc.h cocoa: always compile OSX application code with cocoa 2015-05-02 18:09:56 +02:00
macosx_compat.h
macosx_events.h Update license headers 2015-04-13 12:10:01 +02:00
macosx_events.m osx: add NULL check for input context in a missing case 2015-06-01 19:36:20 +02:00
macosx_events_objc.h osx: never expose input_ctx from EventsResponder 2015-05-26 22:39:04 +02:00
macosx_versions.h
main-fn-cocoa.c build: move main-fn files to osdep 2015-05-02 18:59:58 +02:00
main-fn-unix.c build: move main-fn files to osdep 2015-05-02 18:59:58 +02:00
main-fn-win.c win32: move platform specifics to osdep 2015-05-02 18:59:58 +02:00
main-fn.h build: move main-fn files to osdep 2015-05-02 18:59:58 +02:00
mpv.exe.manifest win32: fix/change application name 2015-02-09 20:44:09 +01:00
mpv.rc Update license headers 2015-04-13 12:10:01 +02:00
path-macosx.m path: make mp_path_join accept normal C strings 2015-05-09 15:26:47 +02:00
path-unix.c path: add resolving desktop path to platform-specific paths 2015-05-01 21:51:10 +02:00
path-win.c path: make mp_path_join accept normal C strings 2015-05-09 15:26:47 +02:00
path.h path: update path descriptions 2015-05-02 16:14:51 +02:00
semaphore.h
semaphore_osx.c
subprocess-posix.c subprocess, lua: export whether the process was killed by us 2015-06-27 21:08:55 +02:00
subprocess-win.c subprocess, lua: export whether the process was killed by us 2015-06-27 21:08:55 +02:00
subprocess.c subprocess: move implementation for deatched subprocesses 2015-04-15 22:43:02 +02:00
subprocess.h subprocess, lua: export whether the process was killed by us 2015-06-27 21:08:55 +02:00
terminal-unix.c terminal-unix: set terminal mode on init 2015-06-27 12:20:40 +02:00
terminal-win.c Various spelling fixes 2015-06-18 19:36:58 +02:00
terminal.h Update license headers 2015-04-13 12:10:01 +02:00
threads.c threads: use utility+POSIX functions instead of weird wrappers 2015-05-11 23:44:36 +02:00
threads.h threads: use utility+POSIX functions instead of weird wrappers 2015-05-11 23:44:36 +02:00
timer-darwin.c
timer-linux.c Update license headers 2015-04-13 12:10:01 +02:00
timer-win2.c win32: use QueryPerformanceCounter for timing 2015-07-04 15:54:14 +02:00
timer.c timer: fix a corner case on clock changes 2015-07-04 17:24:10 +02:00
timer.h threads: use utility+POSIX functions instead of weird wrappers 2015-05-11 23:44:36 +02:00
w32_keyboard.c Revert "win32: add mappings for some special keys" 2015-06-24 15:14:38 +02:00
w32_keyboard.h
win32-console-wrapper.c win32: only attach to the console from mpv.com 2015-04-11 14:34:33 +10:00