]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - play.c
Sort errors alphabetically.
[paraslash.git] / play.c
diff --git a/play.c b/play.c
index a7ce563baafae4e39e33de07867669085c648ac3..034e0f6f189a54cb9e7d4cb365dec0c4dbcc66c0 100644 (file)
--- a/play.c
+++ b/play.c
@@ -36,6 +36,9 @@
  * Playlist handling is done exclusively in play context.
  */
 
+/** Array of error strings. */
+DEFINE_PARA_ERRLIST;
+
 /**
  * Describes a request to change the state of para_play.
  *
@@ -95,9 +98,6 @@ struct play_task {
        char *afhi_txt;
 };
 
-/** Initialize the array of errors for para_play. */
-INIT_PLAY_ERRLISTS;
-
 /* Activate the afh receiver. */
 extern void afh_recv_init(struct receiver *r);
 #undef AFH_RECEIVER
@@ -397,7 +397,8 @@ static int load_file(struct play_task *pt)
        pt->fn.btrn = btr_new_node(&(struct btr_node_description)
                EMBRACE(.name = decoder->name, .parent = pt->rn.btrn,
                        .handler = decoder->execute, .context = &pt->fn));
-       decoder->open(&pt->fn);
+       if (decoder->open)
+               decoder->open(&pt->fn);
 
        /* setup default writer */
        pt->wn.conf = check_writer_arg_or_die(NULL, &pt->wn.writer_num);