From 193a1e77bf798ef2ce2a1546d845f3bfe6ab3928 Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Sun, 12 Jul 2020 11:14:30 -0700 Subject: *: standardize sleeps on nanosleep() usleep() is deprecated by posix in favor of nanosleep(), nanosleep doesn't dick with signals so it's generally better anyways. --- src/rmd_flush_to_ogg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/rmd_flush_to_ogg.c') diff --git a/src/rmd_flush_to_ogg.c b/src/rmd_flush_to_ogg.c index d2e7f44..4a9fb71 100644 --- a/src/rmd_flush_to_ogg.c +++ b/src/rmd_flush_to_ogg.c @@ -37,10 +37,10 @@ #include #include #include +#include #include - //we copy the page because the next call to ogg_stream_pageout //will invalidate it. But we must have pages from //both streams at every time in @@ -162,7 +162,7 @@ void *rmdFlushToOgg(ProgData *pdata) { audioflag=0; #endif if ((!audioflag && !v_st_fin && !pdata->args.nosound) || (!videoflag && !th_st_fin)) { - usleep(10000); + nanosleep(&(struct timespec){ .tv_nsec = 10000000 }, NULL); continue; } -- cgit v1.2.1