diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2011-07-08 14:54:31 -0700 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2011-07-08 15:15:30 -0700 |
commit | f44d50a94c120135faeba6b4a1e5551b4397810f (patch) | |
tree | e09b0cac67467190094e9c59c6fe085195416fa9 /libswscale | |
parent | 42d622fab31dbcae91fd4b0810e0ac07027e2df1 (diff) | |
download | ffmpeg-f44d50a94c120135faeba6b4a1e5551b4397810f.tar.gz |
swscale: fix 16-bit horizontal scaling underflow.
When using e.g. lanczos scaling, values can drop below 0, so they
should never be unsigned.
Diffstat (limited to 'libswscale')
-rw-r--r-- | libswscale/swscale.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libswscale/swscale.c b/libswscale/swscale.c index 14807fdc46..a302373b85 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -1854,7 +1854,7 @@ static void hScale16_c(SwsContext *c, int16_t *_dst, int dstW, const uint8_t *_s for (i = 0; i < dstW; i++) { int j; int srcPos = filterPos[i]; - unsigned int val = 0; + int val = 0; for (j = 0; j < filterSize; j++) { val += src[srcPos + j] * filter[filterSize * i + j]; |