The opus audio format handler.
[paraslash.git] / play.c
diff --git a/play.c b/play.c
index cca203b5d393aa95dc50d0e7df1ffcceb0180420..2cb0536dfc410eae63c0484ec9bd5535a50fe5ae 100644 (file)
--- a/play.c
+++ b/play.c
@@ -7,7 +7,6 @@
 /** \file play.c Paraslash's standalone player. */
 
 #include <regex.h>
-#include <sys/time.h>
 #include <fnmatch.h>
 #include <signal.h>
 
@@ -1196,7 +1195,7 @@ static unsigned get_time_string(struct play_task *pt, char **result)
        );
 }
 
-static void play_post_select(struct sched *s, struct task *t)
+static int play_post_select(struct sched *s, struct task *t)
 {
        struct play_task *pt = container_of(t, struct play_task, task);
        int ret;
@@ -1204,7 +1203,7 @@ static void play_post_select(struct sched *s, struct task *t)
        ret = eof_cleanup(pt);
        if (ret < 0) {
                pt->rq = CRT_TERM_RQ;
-               return;
+               return 0;
        }
        ret = session_post_select(s, t);
        if (ret < 0)
@@ -1234,7 +1233,7 @@ static void play_post_select(struct sched *s, struct task *t)
        }
        ret = 1;
 out:
-       t->error = ret;
+       return ret;
 }
 
 /**
@@ -1255,7 +1254,7 @@ int main(int argc, char *argv[])
        filter_init();
        writer_init();
 
-       gettimeofday(now, NULL);
+       clock_get_realtime(now);
        sched.default_timeout.tv_sec = 5;
 
        parse_config_or_die(argc, argv);