vlc | branch: master | Marvin Scholz <[email protected]> | 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;

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to