Explorar o código

deps-libff: Only sleep if the timed wait didn't expire

John Bradley %!s(int64=10) %!d(string=hai) anos
pai
achega
d9fe44f021
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      deps/libff/libff/ff-timer.c

+ 1 - 1
deps/libff/libff/ff-timer.c

@@ -44,7 +44,7 @@ static void *timer_thread(void *opaque)
 
 			ret = pthread_cond_timedwait(&timer->cond,
 					&timer->mutex, &sleep_time);
-			if (ret != 0) {
+			if (ret != ETIMEDOUT) {
 				// failed to wait, just sleep
 				av_usleep((unsigned)(timer->next_wake
 						- current_time));