X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=play.c;h=034e0f6f189a54cb9e7d4cb365dec0c4dbcc66c0;hb=53d5ac455d0616a5ee8867c986631ed34c177a42;hp=a7ce563baafae4e39e33de07867669085c648ac3;hpb=9b8d01ce7486882bb2fa82b2f328780b9d0ba249;p=paraslash.git diff --git a/play.c b/play.c index a7ce563b..034e0f6f 100644 --- 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);