From ed024aadb6e7be6c3d910045a64db53a6c95e98f Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 5 Dec 2013 00:01:46 +0100 Subject: audio/filter: change filter callback signature The new signature is actually closer to how it actually works, and someone who is not familiar to the API and how it works might make fewer fatal mistakes with the new signature than the old one. Pretty weird. Do this to sneak in a flags parameter, which will later be used to flush remaining data of at least vf_lavfi. --- audio/filter/af_center.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'audio/filter/af_center.c') diff --git a/audio/filter/af_center.c b/audio/filter/af_center.c index 65c1526dd3..d1095e611c 100644 --- a/audio/filter/af_center.c +++ b/audio/filter/af_center.c @@ -59,7 +59,7 @@ static int control(struct af_instance* af, int cmd, void* arg) } // Filter data through filter -static struct mp_audio* play(struct af_instance* af, struct mp_audio* data) +static int filter(struct af_instance* af, struct mp_audio* data, int flags) { struct mp_audio* c = data; // Current working data af_center_t* s = af->priv; // Setup for this instance @@ -75,13 +75,13 @@ static struct mp_audio* play(struct af_instance* af, struct mp_audio* data) a[i+ch] = (a[i]/2) + (a[i+1]/2); } - return c; + return 0; } // Allocate memory and set function pointers static int af_open(struct af_instance* af){ af->control=control; - af->play=play; + af->filter=filter; return AF_OK; } -- cgit v1.2.3