[vlc-commits] posix/wait: Fix timespec calculation
Marvin Scholz
git at videolan.org
Wed Mar 18 16:41:11 CET 2020
vlc | branch: master | Marvin Scholz <epirat07 at gmail.com> | Sat Mar 7 11:44:47 2020 +0100| [fa2a63d02b2f6035466faf7576a837d72f144476] | committer: Marvin Scholz
posix/wait: Fix timespec calculation
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fa2a63d02b2f6035466faf7576a837d72f144476
---
src/posix/wait.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/posix/wait.c b/src/posix/wait.c
index a6d58d721b..dfb0c508db 100644
--- a/src/posix/wait.c
+++ b/src/posix/wait.c
@@ -119,7 +119,7 @@ static void vlc_timespec_adjust(clockid_t cid, struct timespec *restrict ts)
clock_gettime(vlc_clock_id, &now_to);
d = lldiv((ts->tv_sec - now_from.tv_sec + now_to.tv_sec) * 1000000000LL
- + ts->tv_nsec - now_from.tv_nsec - now_to.tv_nsec, 1000000000LL);
+ + ts->tv_nsec - now_from.tv_nsec + now_to.tv_nsec, 1000000000LL);
ts->tv_sec = d.quot;
ts->tv_nsec = d.rem;
More information about the vlc-commits
mailing list