X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=wmadec_filter.c;h=f7ee2c4dbd1281e49792693afd40e83f275cd919;hb=be5daec66f163725489f42d512659a8af5c3fd59;hp=88f69896bf7ea7fd3d2e80bad28a014e079b5c7c;hpb=610cb53b94af8e95326cd44b7845f35cffdb6bf3;p=paraslash.git diff --git a/wmadec_filter.c b/wmadec_filter.c index 88f69896..f7ee2c4d 100644 --- a/wmadec_filter.c +++ b/wmadec_filter.c @@ -16,7 +16,6 @@ #include #include -#include #include "para.h" #include "error.h" @@ -160,8 +159,8 @@ static void init_coef_vlc(struct private_wmadec_data *pwd, int sidx, int didx) int i, l, j, k, level, n = src->n; init_vlc(dst, VLCBITS, n, src->huffbits, src->huffcodes, 4); - pwd->run_table[didx] = alloc(n * sizeof(uint16_t)); - pwd->level_table[didx] = alloc(n * sizeof(uint16_t)); + pwd->run_table[didx] = arr_alloc(n, sizeof(uint16_t)); + pwd->level_table[didx] = arr_alloc(n, sizeof(uint16_t)); i = 2; level = 1; k = 0; @@ -428,7 +427,7 @@ static int wma_decode_init(char *initial_buf, int len, struct private_wmadec_dat int ret, i; PARA_NOTICE_LOG("initial buf: %d bytes\n", len); - pwd = para_calloc(sizeof(*pwd)); + pwd = zalloc(sizeof(*pwd)); ret = read_asf_header(initial_buf, len, &pwd->ahi); if (ret <= 0) { free(pwd); @@ -1159,7 +1158,7 @@ static int wmadec_execute(struct btr_node *btrn, const char *cmd, char **result) #define WMA_OUTPUT_BUFFER_SIZE (128 * 1024) -static int wmadec_post_select(__a_unused struct sched *s, void *context) +static int wmadec_post_monitor(__a_unused struct sched *s, void *context) { struct filter_node *fn = context; int ret, converted, out_size; @@ -1229,6 +1228,6 @@ const struct filter lsg_filter_cmd_com_wmadec_user_data = { .open = wmadec_open, .close = wmadec_close, .execute = wmadec_execute, - .pre_select = generic_filter_pre_select, - .post_select = wmadec_post_select, + .pre_monitor = generic_filter_pre_monitor, + .post_monitor = wmadec_post_monitor, };