From c01a62efbc33cee9ac032d524c2227e35eb29a01 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 21 Nov 2014 10:01:29 +0100 Subject: [PATCH] af_scaletempo: use float division for rate From what I understand the division is to align the dimension of the value from seconds to milliseconds. Hard to tell whether the "rounding" was intentional or not; I'm tipping on "not". Found by Coverity. --- audio/filter/af_scaletempo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/audio/filter/af_scaletempo.c b/audio/filter/af_scaletempo.c index 82aa17c802..9e9ce1b80b 100644 --- a/audio/filter/af_scaletempo.c +++ b/audio/filter/af_scaletempo.c @@ -271,7 +271,7 @@ static int control(struct af_instance *af, int cmd, void *arg) switch (cmd) { case AF_CONTROL_REINIT: { struct mp_audio *data = (struct mp_audio *)arg; - float srate = data->rate / 1000; + float srate = data->rate / 1000.0; int nch = data->nch; int use_int = 0;