X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=compress_filter.c;h=15bed6dfa33c896421ab17a89ec426669cf4b025;hp=ff4ce6fb7663c5a0c35e1a42b433060b3b162b89;hb=refs%2Fheads%2Fpu;hpb=8af63afe0ce633fd488f0669614e2d08680f90bc diff --git a/compress_filter.c b/compress_filter.c index ff4ce6fb..1bce35f5 100644 --- a/compress_filter.c +++ b/compress_filter.c @@ -37,7 +37,7 @@ static void compress_close(struct filter_node *fn) free(fn->private_data); } -static int compress_post_select(__a_unused struct sched *s, void *context) +static int compress_post_monitor(__a_unused struct sched *s, void *context) { struct filter_node *fn = context; struct private_compress_data *pcd = fn->private_data; @@ -59,14 +59,14 @@ next_buffer: btr_merge(btrn, fn->min_iqs); length = btr_next_buffer(btrn, &inbuf) & ~(size_t)1; if (length == 0) { /* eof and 1 byte available */ - ret = -E_COMPRESS_EOF; + ret = -E_EOF; goto err; } ip = (int16_t *)inbuf; if (inplace) op = ip; else - op = para_malloc(length); + op = alloc(length); for (i = 0; i < length / 2; i++) { /* be careful in that heat, my dear */ int sample = *ip++; @@ -116,7 +116,7 @@ err: static void compress_open(struct filter_node *fn) { - struct private_compress_data *pcd = para_calloc(sizeof(*pcd)); + struct private_compress_data *pcd = zalloc(sizeof(*pcd)); uint32_t inertia = U32_OPTVAL(INERTIA, fn->lpr); uint32_t aggressiveness = U32_OPTVAL(AGGRESSIVENESS, fn->lpr); @@ -162,6 +162,6 @@ const struct filter lsg_filter_cmd_com_compress_user_data = { .setup = compress_setup, .open = compress_open, .close = compress_close, - .pre_select = generic_filter_pre_select, - .post_select = compress_post_select, + .pre_monitor = generic_filter_pre_monitor, + .post_monitor = compress_post_monitor, };