diff options
Diffstat (limited to 'cmds')
-rw-r--r-- | cmds/bootanimation/BootAnimation.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp index b83c7ab..4e7c9c4 100644 --- a/cmds/bootanimation/BootAnimation.cpp +++ b/cmds/bootanimation/BootAnimation.cpp @@ -734,7 +734,10 @@ bool BootAnimation::movie() clearReg.subtractSelf(Rect(xc, yc, xc+animation.width, yc+animation.height)); pthread_mutex_init(&mp_lock, NULL); - pthread_cond_init(&mp_cond, NULL); + pthread_condattr_t attr; + pthread_condattr_init(&attr); + pthread_condattr_setclock(&attr, CLOCK_MONOTONIC); + pthread_cond_init(&mp_cond, &attr); for (size_t i=0 ; i<pcount ; i++) { const Animation::Part& part(animation.parts[i]); @@ -867,7 +870,7 @@ bool BootAnimation::movie() if (isMPlayerPrepared) { ALOGD("waiting for media player to complete."); struct timespec timeout; - clock_gettime(CLOCK_REALTIME, &timeout); + clock_gettime(CLOCK_MONOTONIC, &timeout); timeout.tv_sec += 5; //timeout after 5s. pthread_mutex_lock(&mp_lock); |