-/*
- * Copyright (C) 2009 Andre Noll <maan@tuebingen.mpg.de>
- *
- * Licensed under the GPL v2. For licencing details see COPYING.
- */
+/* Copyright (C) 2009 Andre Noll <maan@tuebingen.mpg.de>, see file COPYING. */
/** \file fecdec_filter.c A filter that fec-decodes an audio stream. */
}
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. */
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;
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;
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,
};