summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-11-21 10:01:29 +0100
committerwm4 <wm4@nowhere>2014-11-21 10:09:15 +0100
commitc01a62efbc33cee9ac032d524c2227e35eb29a01 (patch)
treee08ecbcc4bf8b04adc3782ed692add0545546106 /audio
parent86b521f7dfac8aa6a8edf030ce8fe987fb13a104 (diff)
downloadmpv-c01a62efbc33cee9ac032d524c2227e35eb29a01.tar.bz2
mpv-c01a62efbc33cee9ac032d524c2227e35eb29a01.tar.xz
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.
Diffstat (limited to 'audio')
-rw-r--r--audio/filter/af_scaletempo.c2
1 files changed, 1 insertions, 1 deletions
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;