X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=flacdec_filter.c;h=6a3a8effaf83b3b9e333e429762f0ff2d3938afe;hp=2c9f8607c0d7603664ef13acd3a418f13625b8f7;hb=HEAD;hpb=e3a7e12639c34fd86d48a072beb48add8c498d09;ds=sidebyside diff --git a/flacdec_filter.c b/flacdec_filter.c index 2c9f8607..fb8ebf15 100644 --- a/flacdec_filter.c +++ b/flacdec_filter.c @@ -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; }