filter: Make ->open() optional.
[paraslash.git] / play.c
diff --git a/play.c b/play.c
index a7ce563baafae4e39e33de07867669085c648ac3..d2539ee134773614a40bca9941f35dd161007946 100644 (file)
--- a/play.c
+++ b/play.c
@@ -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);