[vlc-commits] threads: fix the time_t to vlc_tick_t conversion
Steve Lhomme
git at videolan.org
Wed Jul 4 10:39:18 CEST 2018
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Jul 4 09:47:31 2018 +0200| [fcb8945e30779a22f26361bba24ff1aa5eed3f45] | committer: Steve Lhomme
threads: fix the time_t to vlc_tick_t conversion
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fcb8945e30779a22f26361bba24ff1aa5eed3f45
---
src/misc/threads.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/misc/threads.c b/src/misc/threads.c
index b34d28add5..e4ec1da935 100644
--- a/src/misc/threads.c
+++ b/src/misc/threads.c
@@ -213,13 +213,13 @@ int vlc_cond_timedwait(vlc_cond_t *cond, vlc_mutex_t *mutex, vlc_tick_t deadline
}
int vlc_cond_timedwait_daytime(vlc_cond_t *cond, vlc_mutex_t *mutex,
- time_t deadline)
+ time_t deadline_daytime)
{
struct timespec ts;
+ vlc_tick_t deadline = vlc_tick_from_sec( deadline_daytime );
timespec_get(&ts, TIME_UTC);
- deadline -= vlc_tick_from_sec( ts.tv_sec );
- deadline -= VLC_TICK_FROM_NS( ts.tv_nsec );
+ deadline -= vlc_tick_from_sec( ts.tv_sec ) + VLC_TICK_FROM_NS( ts.tv_nsec );
return vlc_cond_wait_delay(cond, mutex, deadline);
}
More information about the vlc-commits
mailing list