X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=fecdec_filter.c;h=375f4c0afb244b52e5d7b437a6b612c3da9d7f5b;hb=9aa1bf4680f23c0db8d8b3edba966d1120c306a7;hp=a720a7a76e13498ef1b0699985968325db10e6ec;hpb=27c08870ba172782f6406045007b6ff32a4f7329;p=paraslash.git diff --git a/fecdec_filter.c b/fecdec_filter.c index a720a7a7..375f4c0a 100644 --- a/fecdec_filter.c +++ b/fecdec_filter.c @@ -226,7 +226,7 @@ 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 = arr_alloc(fg->num_slices, sizeof(int)); - fg->data = zalloc(fg->num_slices * sizeof(unsigned char *)); + fg->data = arr_zalloc(fg->num_slices, sizeof(unsigned char *)); } r = fg->num_received_slices; /* Check if we already have this slice. */ @@ -360,7 +360,7 @@ static int read_fec_header(char *buf, size_t len, struct fec_header *h) h->bos = read_u8(buf + 22); h->header_stream = read_u8(buf + 23); if (!memcmp(buf, FEC_EOF_PACKET, FEC_EOF_PACKET_LEN)) - return -E_FECDEC_EOF; + return -E_EOF; // PARA_DEBUG_LOG("group %u, slize %u, slices per group: %u\n", // h->group_num, h->slice_num, h->slices_per_group); 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; @@ -478,7 +478,7 @@ static void fecdec_open(struct filter_node *fn) 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, };