]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - audiod.c
audiod: Simplify start_stop_decoders().
[paraslash.git] / audiod.c
index d815c4aa6c98e699dc48304cd96db1d14c28035b..b7b6d2d76af88ecbbb2f4a2f892f0848a4d5ad37 100644 (file)
--- a/audiod.c
+++ b/audiod.c
@@ -1153,13 +1153,10 @@ static void close_unused_slots(void)
  */
 void __noreturn clean_exit(int status, const char *msg)
 {
-       int i;
-
        if (socket_name)
                unlink(socket_name);
        close_stat_pipe();
-       FOR_EACH_SLOT(i)
-               close_slot(i);
+       close_unused_slots();
        audiod_cmdline_parser_free(&conf);
        close_stat_clients();
        PARA_EMERG_LOG("%s\n", msg);
@@ -1174,7 +1171,6 @@ static void start_stop_decoders(void)
 {
        int ret;
        struct slot_info *sl;
-       struct audio_format_info *a;
 
        close_unused_slots();
        if (audiod_status != AUDIOD_ON ||
@@ -1188,9 +1184,7 @@ static void start_stop_decoders(void)
                return;
        }
        sl = slot + ret;
-       a = afi + sl->format;
-       if (a->num_filters)
-               open_filters(sl);
+       open_filters(sl);
        open_writers(sl);
        activate_grab_clients(&sched);
        btr_log_tree(sl->receiver_node->btrn, LL_NOTICE);