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_scaletempo.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_scaletempo.c')
-rw-r--r-- | audio/filter/af_scaletempo.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/audio/filter/af_scaletempo.c b/audio/filter/af_scaletempo.c index f7e58f0923..960aaf8c2e 100644 --- a/audio/filter/af_scaletempo.c +++ b/audio/filter/af_scaletempo.c @@ -211,13 +211,13 @@ static void output_overlap_s16(af_scaletempo_t *s, void *buf_out, } // 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_scaletempo_t *s = af->priv; if (s->scale == 1.0) { af->delay = 0; - return data; + return 0; } mp_audio_realloc_min(af->data, @@ -261,7 +261,7 @@ static struct mp_audio *play(struct af_instance *af, struct mp_audio *data) data->planes[0] = af->data->planes[0]; data->samples = (pout - (int8_t *)af->data->planes[0]) / af->data->sstride; - return data; + return 0; } // Initialization and runtime control @@ -458,7 +458,7 @@ static int af_open(struct af_instance *af) af->control = control; af->uninit = uninit; - af->play = play; + af->filter = filter; s->speed_tempo = !!(s->speed_opt & SCALE_TEMPO); s->speed_pitch = !!(s->speed_opt & SCALE_PITCH); |