/*
- * Copyright (C) 2006-2011 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2006-2014 Andre Noll <maan@tuebingen.mpg.de>
*
* Licensed under the GPL v2. For licencing details see COPYING.
*/
/** \file aacdec_filter.c paraslash's aac (m4a) decoder. */
#include <regex.h>
-#include <stdbool.h>
#include "para.h"
#include "list.h"
fn->private_data = NULL;
}
-static void aacdec_post_select(__a_unused struct sched *s, struct task *t)
+static int aacdec_post_select(__a_unused struct sched *s, void *context)
{
- struct filter_node *fn = container_of(t, struct filter_node, task);
+ struct filter_node *fn = context;
struct btr_node *btrn = fn->btrn;
struct private_aacdec_data *padd = fn->private_data;
int i, ret;
size_t len, skip, consumed, loaded;
next_buffer:
- t->error = 0;
ret = btr_node_status(btrn, fn->min_iqs, BTR_NT_INTERNAL);
if (ret < 0)
goto err;
if (ret == 0)
- return;
+ return 0;
btr_merge(btrn, fn->min_iqs);
len = btr_next_buffer(btrn, (char **)&inbuf);
len = PARA_MIN(len, (size_t)8192);
ret = -E_AACDEC_INIT;
if (NeAACDecInit2(padd->handle, p,
padd->decoder_length, &rate,
- &channels) < 0)
+ &channels) != 0)
goto out;
}
padd->sample_rate = rate;
}
err:
assert(ret < 0);
- t->error = ret;
- btr_remove_node(btrn);
+ btr_remove_node(&fn->btrn);
+ return ret;
}
/**