X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=fecdec_filter.c;h=1d8fbc16db71094d4f81b2c8c6bb88014087582c;hb=81bc7110ff6a4c2d002618b94fcf5aa60cd4cad2;hp=13d4f7b22f6a46da75ef4b629275d603fc5f39d1;hpb=d31995b3074bb19aa4da66ce5c4774ca9ed101a1;p=paraslash.git diff --git a/fecdec_filter.c b/fecdec_filter.c index 13d4f7b2..1d8fbc16 100644 --- a/fecdec_filter.c +++ b/fecdec_filter.c @@ -225,8 +225,8 @@ static int add_slice(char *buf, struct fecdec_group *fg) } if (fg->num_slices == 0) { fg->num_slices = fg->h.slices_per_group; - fg->idx = para_malloc(fg->num_slices * sizeof(int)); - fg->data = para_calloc(fg->num_slices * sizeof(unsigned char *)); + fg->idx = arr_alloc(fg->num_slices, sizeof(int)); + fg->data = arr_zalloc(fg->num_slices, sizeof(unsigned char *)); } r = fg->num_received_slices; /* Check if we already have this slice. */ @@ -236,7 +236,7 @@ static int add_slice(char *buf, struct fecdec_group *fg) return 0; } fg->idx[r] = slice_num; - fg->data[r] = para_malloc(fg->h.slice_bytes); + fg->data[r] = alloc(fg->h.slice_bytes); memcpy(fg->data[r], buf, fg->h.slice_bytes); fg->num_received_slices++; return 1; @@ -431,7 +431,7 @@ static void fecdec_close(struct filter_node *fn) fn->private_data = NULL; } -static int fecdec_post_select(__a_unused struct sched *s, void *context) +static int fecdec_post_monitor(__a_unused struct sched *s, void *context) { struct filter_node *fn = context; struct btr_node *btrn = fn->btrn; @@ -471,14 +471,14 @@ out: static void fecdec_open(struct filter_node *fn) { struct private_fecdec_data *pfd; - pfd = para_calloc(sizeof(*pfd)); + pfd = zalloc(sizeof(*pfd)); fn->private_data = pfd; fn->min_iqs = FEC_HEADER_SIZE; } const struct filter lsg_filter_cmd_com_fecdec_user_data = { .open = fecdec_open, - .pre_select = generic_filter_pre_select, - .post_select = fecdec_post_select, + .pre_monitor = generic_filter_pre_monitor, + .post_monitor = fecdec_post_monitor, .close = fecdec_close, };