]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - flacdec_filter.c
paraslash 0.7.3
[paraslash.git] / flacdec_filter.c
index 2c9f8607c0d7603664ef13acd3a418f13625b8f7..fb8ebf15d1ec664e39923c58515a3704441ab0da 100644 (file)
@@ -135,7 +135,7 @@ static FLAC__StreamDecoderWriteStatus write_cb(
        struct btr_node *btrn = fn->btrn;
        size_t k, n = frame->header.blocksize;
        unsigned channels = FLAC__stream_decoder_get_channels(decoder);
-       char *outbuffer = para_malloc(n * channels * 2);
+       char *outbuffer = arr_alloc(n, channels * 2);
 
        if (channels == 1) {
                for (k = 0; k < n; k++) {
@@ -232,7 +232,7 @@ static int flacdec_post_monitor(__a_unused struct sched *s, void *context)
        if (output_queue_full(btrn))
                return 0;
        ret = btr_node_status(btrn, fn->min_iqs, BTR_NT_INTERNAL);
-       if (ret < 0 && ret != -E_BTR_EOF) /* fatal error */
+       if (ret < 0 && ret != -E_EOF) /* fatal error */
                goto out;
        if (ret <= 0 && !pfd->have_more) /* nothing to do */
                goto out;
@@ -248,7 +248,7 @@ static int flacdec_post_monitor(__a_unused struct sched *s, void *context)
        pfd->have_more = false;
        FLAC__stream_decoder_process_single(pfd->decoder);
        state = FLAC__stream_decoder_get_state(pfd->decoder);
-       ret = -E_FLACDEC_EOF;
+       ret = -E_EOF;
        if (state == FLAC__STREAM_DECODER_END_OF_STREAM)
                goto out;
        if (state == FLAC__STREAM_DECODER_ABORTED) {
@@ -286,7 +286,7 @@ static void flacdec_close(struct filter_node *fn)
 
 static void flacdec_open(struct filter_node *fn)
 {
-       struct private_flacdec_data *pfd = para_calloc(sizeof(*pfd));
+       struct private_flacdec_data *pfd = zalloc(sizeof(*pfd));
        fn->private_data = pfd;
        fn->min_iqs = 0;
 }