summaryrefslogtreecommitdiff
path: root/src/rmd_flush_to_ogg.c
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2020-07-12 11:14:30 -0700
committerVito Caputo <vcaputo@pengaru.com>2020-07-12 11:14:30 -0700
commit193a1e77bf798ef2ce2a1546d845f3bfe6ab3928 (patch)
tree5bc2701279b1fd3fdd4d3054270d7a003e23e708 /src/rmd_flush_to_ogg.c
parent99bc91a3c939e07f2d754a67dce60a55d509b3c1 (diff)
*: 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.
Diffstat (limited to 'src/rmd_flush_to_ogg.c')
-rw-r--r--src/rmd_flush_to_ogg.c4
1 files changed, 2 insertions, 2 deletions
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 <stdio.h>
#include <stdlib.h>
#include <errno.h>
+#include <time.h>
#include <unistd.h>
-
//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;
}
© All Rights Reserved