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
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
io.h
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
macosx_compat.h
macosx_events.h
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
mpv.rc
path-macosx.m path: make mp_path_join accept normal C strings 2015-05-09 15:26:47 +02:00
path-unix.c
path-win.c path: make mp_path_join accept normal C strings 2015-05-09 15:26:47 +02:00
path.h
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.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
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
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