aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Hector Martin <marcan@marcan.st>2018-08-26 00:19:48 +0900
committerGravatar Jan Ekström <jeebjp@gmail.com>2018-08-25 19:20:42 +0300
commita10754f038b7a69436bef536d9ed7cc4755ba0d1 (patch)
tree6e90ea42eabb615d28621c512b66e761b61c7054
parentd4bbfb8453f2161fd21e6f3c00023edf43cc88fc (diff)
af_rubberband: reset delay to 0 on reset
This fixes A-V drift on seeking
-rw-r--r--audio/filter/af_rubberband.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/audio/filter/af_rubberband.c b/audio/filter/af_rubberband.c
index 6c8c773e62..c7b6317c13 100644
--- a/audio/filter/af_rubberband.c
+++ b/audio/filter/af_rubberband.c
@@ -167,6 +167,7 @@ static void process(struct mp_filter *f)
if (eof) {
mp_pin_in_write(f->ppins[1], MP_EOF_FRAME);
rubberband_reset(p->rubber);
+ p->rubber_delay = 0;
TA_FREEP(&p->pending);
p->sent_final = false;
return;
@@ -263,6 +264,7 @@ static void reset(struct mp_filter *f)
if (p->rubber)
rubberband_reset(p->rubber);
+ p->rubber_delay = 0;
p->sent_final = false;
TA_FREEP(&p->pending);
}