diff options
author | wm4 <wm4@nowhere> | 2013-12-05 00:01:46 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-12-05 00:01:46 +0100 |
commit | ed024aadb6e7be6c3d910045a64db53a6c95e98f (patch) | |
tree | f26724d268e13ee8ec8f327ea829b65ccd6fab19 /audio/filter/af_drc.c | |
parent | 2bcfb49a390a928c535cba7cab2b4136f27fceca (diff) | |
download | mpv-ed024aadb6e7be6c3d910045a64db53a6c95e98f.tar.bz2 mpv-ed024aadb6e7be6c3d910045a64db53a6c95e98f.tar.xz |
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.
Diffstat (limited to 'audio/filter/af_drc.c')
-rw-r--r-- | audio/filter/af_drc.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/audio/filter/af_drc.c b/audio/filter/af_drc.c index 103080c1a1..0edb99f469 100644 --- a/audio/filter/af_drc.c +++ b/audio/filter/af_drc.c @@ -272,8 +272,7 @@ static void method2_float(af_drc_t *s, struct mp_audio *c) s->idx = (s->idx + 1) % NSAMPLES; } -// 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) { af_drc_t *s = af->priv; @@ -291,14 +290,14 @@ static struct mp_audio* play(struct af_instance* af, struct mp_audio* data) else method1_float(s, data); } - return data; + return 0; } // Allocate memory and set function pointers static int af_open(struct af_instance* af){ int i = 0; af->control=control; - af->play=play; + af->filter=filter; af_drc_t *priv = af->priv; priv->mul = MUL_INIT; |