diff --git a/src/lib/in.c b/src/lib/in.c index 19a3cb641..6e011b945 100644 --- a/src/lib/in.c +++ b/src/lib/in.c @@ -2043,6 +2043,10 @@ delaybound_to_deadline(const struct timespec* ts, struct timespec* absdl){ gettimeofday(&tv, NULL); absdl->tv_sec = ts->tv_sec + tv.tv_sec; absdl->tv_nsec = ts->tv_nsec + tv.tv_usec * 1000; + if(absdl->tv_nsec > 1000000000){ + ++absdl->tv_sec; + absdl->tv_nsec -= 1000000000; + } } } diff --git a/src/player/play.cpp b/src/player/play.cpp index 6956f3200..87a5194bf 100644 --- a/src/player/play.cpp +++ b/src/player/play.cpp @@ -103,7 +103,7 @@ auto perframe(struct ncvisual* ncv, struct ncvisual_options* vopts, }else{ keyp = nc.get(false, &ni); } - if(keyp == (uint32_t)-1){ + if(keyp == 0){ break; } if(keyp == ' '){