From 3490446b1bd56b428ef734e8bd307c94601c7566 Mon Sep 17 00:00:00 2001 From: Taner Sener Date: Mon, 10 Aug 2020 23:41:56 +0100 Subject: [PATCH] fix monitorWait method for android, fixes #520 --- android/app/src/main/cpp/mobileffmpeg.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/android/app/src/main/cpp/mobileffmpeg.c b/android/app/src/main/cpp/mobileffmpeg.c index 2785aedc1..d6dc110c8 100644 --- a/android/app/src/main/cpp/mobileffmpeg.c +++ b/android/app/src/main/cpp/mobileffmpeg.c @@ -306,6 +306,8 @@ void monitorWait(int milliSeconds) { ts.tv_nsec = tp.tv_usec * 1000; ts.tv_sec += milliSeconds / 1000; ts.tv_nsec += (milliSeconds % 1000)*1000000; + ts.tv_sec += ts.tv_nsec / 1000000000L; + ts.tv_nsec = ts.tv_nsec % 1000000000L; pthread_mutex_lock(&monitorMutex); pthread_cond_timedwait(&monitorCondition, &monitorMutex, &ts);