diff options
author | Xi Wang <xi.wang@gmail.com> | 2013-01-19 13:21:35 -0500 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2013-01-19 22:21:23 +0100 |
commit | 8d0631c8fa890a1a01c7289c0bf8b2ff44fe5b9c (patch) | |
tree | 08424f3fa34c2ae1f99b1c6d3af1686c1a6c8c9f /libavcodec | |
parent | 0a837b631757a7407df038248eea5e9e79b1cb79 (diff) | |
download | ffmpeg-8d0631c8fa890a1a01c7289c0bf8b2ff44fe5b9c.tar.gz |
mpegvideo: fix loop condition in draw_line()
The loop condition `x = ex' is incorrect. It should be `x <= ex'.
This bug was introduced in commit c65dfac4 "mpegvideo.c: K&R formatting
and cosmetics."
CC:libav-stable@libav.org
(cherry picked from commit 992b03183819553a73b4f870a710ef500b4eb6d0)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/mpegvideo.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index 0b6ddb956c..10b13b552e 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -1658,7 +1658,7 @@ static void draw_line(uint8_t *buf, int sx, int sy, int ex, int ey, buf += sx + sy * stride; ex -= sx; f = ((ey - sy) << 16) / ex; - for (x = 0; x = ex; x++) { + for (x = 0; x <= ex; x++) { y = (x * f) >> 16; fr = (x * f) & 0xFFFF; buf[y * stride + x] += (color * (0x10000 - fr)) >> 16; |