static void ogg_open(struct filter_node *fn)
{
- fn->private_data = para_calloc(sizeof(struct private_oggdec_data));
+ fn->private_data = zalloc(sizeof(struct private_oggdec_data));
fn->min_iqs = 8000;
}
fn->private_data = NULL;
}
-static int oggdec_execute(struct btr_node *btrn, const char *cmd, char **result)
+static int oggdec_execute(const struct btr_node *btrn, const char *cmd,
+ char **result)
{
struct filter_node *fn = btr_context(btrn);
struct private_oggdec_data *pod = fn->private_data;
struct btr_node *btrn = fn->btrn;
int ret, oret;
size_t iqs;
- struct OggVorbis_File *vf = para_malloc(sizeof(*vf));
+ struct OggVorbis_File *vf = alloc(sizeof(*vf));
PARA_NOTICE_LOG("iqs: %zu, min_iqs: %zu, opening ov callbacks\n",
btr_get_input_queue_size(btrn), fn->min_iqs);
ret = btr_node_status(btrn, fn->min_iqs, BTR_NT_INTERNAL);
if (ret < 0) {
- if (ret != -E_BTR_EOF) /* fatal error */
+ if (ret != -E_EOF) /* fatal error */
goto out;
if (fn->min_iqs == 0 && !pod->have_more) /* EOF */
goto out;
goto out;
}
have = 0;
- buf = para_malloc(OGGDEC_OUTPUT_CHUNK_SIZE);
+ buf = alloc(OGGDEC_OUTPUT_CHUNK_SIZE);
for (;;) {
ret = ov_read(pod->vf, buf + have, OGGDEC_OUTPUT_CHUNK_SIZE - have,
ENDIAN, 2 /* 16 bit */, 1 /* signed */, NULL);