summaryrefslogtreecommitdiffstats
path: root/audio/filter/af_bs2b.c
diff options
context:
space:
mode:
Diffstat (limited to 'audio/filter/af_bs2b.c')
-rw-r--r--audio/filter/af_bs2b.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/audio/filter/af_bs2b.c b/audio/filter/af_bs2b.c
index 0e77b3e4eb..769a2b4577 100644
--- a/audio/filter/af_bs2b.c
+++ b/audio/filter/af_bs2b.c
@@ -42,7 +42,7 @@ static struct mp_audio *play_##name(struct af_instance *af, struct mp_audio *dat
{ \
/* filter is called for all pairs of samples available in the buffer */ \
bs2b_cross_feed_##name(((struct af_bs2b*)(af->priv))->filter, \
- (type*)(data->audio), data->len/data->bps/2); \
+ (type*)(data->planes[0]), data->samples); \
\
return data; \
}
@@ -161,7 +161,6 @@ static int control(struct af_instance *af, int cmd, void *arg)
static void uninit(struct af_instance *af)
{
struct af_bs2b *s = af->priv;
- free(af->data);
if (s->filter)
bs2b_close(s->filter);
}
@@ -172,13 +171,9 @@ static int af_open(struct af_instance *af)
struct af_bs2b *s = af->priv;
af->control = control;
af->uninit = uninit;
- af->mul = 1;
- if (!(af->data = calloc(1, sizeof(struct mp_audio))))
- return AF_ERROR;
// NULL means failed initialization
if (!(s->filter = bs2b_open())) {
- free(af->data);
return AF_ERROR;
}