resample filter: Implementation.
[paraslash.git] / check_wav.c
index ab1c618..acdbece 100644 (file)
@@ -104,6 +104,8 @@ int check_wav_post_select(struct check_wav_context *cwc)
        uint16_t bps; /* bits per sample */
        const char *sample_formats[] = {SAMPLE_FORMATS};
 
+       if (!btrn)
+               return 0;
        ret = btr_node_status(btrn, cwc->min_iqs, BTR_NT_INTERNAL);
        if (ret <= 0)
                goto out;
@@ -159,7 +161,8 @@ out:
 }
 
 struct check_wav_context *check_wav_init(struct btr_node *parent,
-               struct wav_params *params, struct btr_node **cw_btrn)
+               struct btr_node *child, struct wav_params *params,
+               struct btr_node **cw_btrn)
 {
        struct check_wav_context *cwc = para_calloc(sizeof(*cwc));
 
@@ -167,7 +170,7 @@ struct check_wav_context *check_wav_init(struct btr_node *parent,
        cwc->min_iqs = WAV_HEADER_LEN;
        cwc->params = *params;
        cwc->btrn = btr_new_node(&(struct btr_node_description)
-               EMBRACE(.name = "check_wav", .parent = parent,
+               EMBRACE(.name = "check_wav", .parent = parent, .child = child,
                .handler = check_wav_exec, .context = cwc));
        if (cw_btrn)
                *cw_btrn = cwc->btrn;