Makefile.in: Remove special treatment of ortp_send/ortp_recv
[paraslash.git] / audiod.c
index ae20d70..61711dc 100644 (file)
--- a/audiod.c
+++ b/audiod.c
@@ -696,7 +696,7 @@ static void start_stream_writer(int slot_num)
        if (a->write_cmd)
                glob = glob_cmd(a->write_cmd);
        if (!glob)
-               glob = para_strdup("para_play");
+               glob = para_strdup("para_write -w alsa");
        PARA_INFO_LOG("starting stream writer: %s\n", glob);
        open_filters(slot_num);
        ret = para_exec_cmdline_pid(&s->wpid, glob, fds);
@@ -806,7 +806,7 @@ static void check_stat_line(char *line)
 {
        int itemnum;
        size_t ilen = 0;
-       struct timeval tv;
+       long unsigned sec, usec;
        char *tmp;
 
        PARA_INFO_LOG("line: %s\n", line);
@@ -838,14 +838,16 @@ static void check_stat_line(char *line)
                length_seconds = atoi(line + ilen + 1);
                break;
        case SI_STREAM_START:
-               if (sscanf(line + ilen + 1, "%lu.%lu",
-                               &tv.tv_sec, &tv.tv_usec) == 2)
-                       server_stream_start = tv;
+               if (sscanf(line + ilen + 1, "%lu.%lu", &sec, &usec) == 2) {
+                       server_stream_start.tv_sec = sec;
+                       server_stream_start.tv_usec = usec;
+               }
                break;
        case SI_CURRENT_TIME:
-               if (sscanf(line + ilen + 1, "%lu.%lu", &tv.tv_sec,
-                               &tv.tv_usec) == 2)
+               if (sscanf(line + ilen + 1, "%lu.%lu", &sec, &usec) == 2) {
+                       struct timeval tv = {sec, usec};
                        compute_time_diff(&tv);
+               }
                break;
        }
 }
@@ -1560,8 +1562,7 @@ repeat:
        FD_ZERO(&wfds);
        FD_ZERO(&rfds);
        /* always check signal pipe and the local socket */
-       FD_SET(signal_pipe, &rfds);
-       max_fileno = signal_pipe;
+       para_fd_set(signal_pipe, &rfds, &max_fileno);
        para_fd_set(audiod_socket, &rfds, &max_fileno);
 
        if (audiod_status != AUDIOD_ON)