#include <math.h>
#include <regex.h>
-#include <sys/select.h>
#include "para.h"
#include "error.h"
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;
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);
fn->private_data = NULL;
}
-static int wmadec_execute(struct btr_node *btrn, const char *cmd, char **result)
+static int wmadec_execute(const struct btr_node *btrn, const char *cmd,
+ char **result)
{
struct filter_node *fn = btr_context(btrn);
struct private_wmadec_data *pwd = fn->private_data;
#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;
return 0;
btr_merge(btrn, fn->min_iqs);
len = btr_next_buffer(btrn, &in);
- ret = -E_WMADEC_EOF;
+ ret = -E_EOF;
if (len < fn->min_iqs)
goto err;
if (!pwd) {
.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,
};