summaryrefslogtreecommitdiff
path: root/libavfilter
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2013-04-03 10:52:01 +0000
committerPaul B Mahol <onemda@gmail.com>2013-04-03 10:55:13 +0000
commit0ab10f69efd3ab0e66ec9d611e2d41bdccea83cd (patch)
treebb148b669d9541db85ec24c4a5ee86d875b8c8a8 /libavfilter
parent6e90d9e2066ab35a72d4053de3e0cdc5a342ac67 (diff)
lavfi/earwax: clip sample, this is what sox does
Fixes #1884. Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/af_earwax.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/af_earwax.c b/libavfilter/af_earwax.c
index b1d3d6f871..104fb18a34 100644
--- a/libavfilter/af_earwax.c
+++ b/libavfilter/af_earwax.c
@@ -98,10 +98,10 @@ static inline int16_t *scalarproduct(const int16_t *in, const int16_t *endin, in
int16_t j;
while (in < endin) {
- sample = 32;
+ sample = 0;
for (j = 0; j < NUMTAPS; j++)
sample += in[j] * filt[j];
- *out = sample >> 6;
+ *out = av_clip_int16(sample >> 6);
out++;
in++;
}