summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorXi Wang <xi.wang@gmail.com>2013-01-19 13:21:35 -0500
committerLuca Barbato <lu_zero@gentoo.org>2013-01-19 22:20:43 +0100
commit992b03183819553a73b4f870a710ef500b4eb6d0 (patch)
treeb842b0af4601f15ceece8b737e4713c594750f40 /libavcodec
parent40976257bc35b1649ffde3bd4598a9cf3573ebf3 (diff)
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 Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/mpegvideo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 5bb04dd07e..ce366102d1 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -1659,7 +1659,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;